File: Makefile.pre

package info (click to toggle)
ocamlnet 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 51,764 kB
  • ctags: 16,446
  • sloc: ml: 148,419; ansic: 10,989; sh: 1,885; makefile: 1,355
file content (103 lines) | stat: -rw-r--r-- 2,665 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
TOP_DIR=../..

include $(TOP_DIR)/Makefile.conf

PRE = 1
PKGNAME = netunidata

MAPPINGS = netmappings_iso.ml \
	   netmappings_other.ml \
	   netmappings_jp.ml \
	   netmappings_kr.ml
GENERATE = $(MAPPINGS) netunichecksums.ml netuniconfig.ml netdb_done META
PMAP = $(MAPPINGS:.ml=.pmap)

CLEAN_LIST += $(GENERATE)

ISO_MAPPINGS   = mappings/iso*.unimap
JP_MAPPINGS    = mappings/jis*.*map
KR_MAPPINGS    = mappings/ks*.*map
OTHER_MAPPINGS = mappings/cp*.unimap \
                 mappings/adobe*.unimap \
                 mappings/koi*.unimap \
                 mappings/mac*.unimap \
                 mappings/windows*.unimap

INSTOTHER = install-netdb
PACKLIST = netdb-packlist
INSTALL_EXTRA = $(MAPPINGS:.ml=.cmo) $(MAPPINGS:.ml=.cmx) $(MAPPINGS:.ml=.o) \
                netuniinit.cmo netuniinit.cmx netuniinit.o

PP_OPTIONS = -pp "$(CPPO) $(PP_BYTES) $(PP_DEPRECATED)"

include $(TOP_DIR)/Makefile.rules

netdb-packlist: netdb_done
	test -d netdb
	(cd netdb && ls *.netdb) | \
	{ while read f; do echo "$(NET_DB_DIR)/$$f"; done; } >netdb-packlist

.PHONY: install-netdb
install-netdb:
	mkdir -p "$(DESTDIR)$(NET_DB_DIR)"
	cp netdb/*.netdb "$(DESTDIR)$(NET_DB_DIR)"
	@echo "Installed .netdb files into $(DESTDIR)$(NET_DB_DIR)"


# ASN1: these tables are built-in, see netstring

unimap_to_ocaml = $(TOP_DIR)/tools/unimap_to_ocaml/unimap_to_ocaml

# The .pmap files are the distributed files. The .unimap files cannot be
# distributed because of license conditions.

netmappings_iso.pmap:
	$(unimap_to_ocaml) \
	        -o netmappings_iso.pmap -pmap $(ISO_MAPPINGS)

netmappings_iso.ml: netmappings_iso.pmap
	$(unimap_to_ocaml) \
		-o netmappings_iso.ml netmappings_iso.pmap

netmappings_jp.pmap:
	$(unimap_to_ocaml) \
	        -o netmappings_jp.pmap -pmap $(JP_MAPPINGS)

netmappings_jp.ml: netmappings_jp.pmap
	$(unimap_to_ocaml) \
		-o netmappings_jp.ml netmappings_jp.pmap

netmappings_kr.pmap:
	$(unimap_to_ocaml) \
	        -o netmappings_kr.pmap -pmap $(KR_MAPPINGS)

netmappings_kr.ml: netmappings_kr.pmap
	$(unimap_to_ocaml) \
		-o netmappings_kr.ml netmappings_kr.pmap

netmappings_other.pmap:
	$(unimap_to_ocaml) \
	        -o netmappings_other.pmap -pmap $(OTHER_MAPPINGS)

netmappings_other.ml: netmappings_other.pmap
	$(unimap_to_ocaml) \
		-o netmappings_other.ml netmappings_other.pmap

netunichecksums.ml: $(PMAP)
	$(unimap_to_ocaml) \
		-o netunichecksums.ml -cksum $(PMAP)

netuniconfig.ml:
	{ echo "(* Generated file *)"; \
	  echo 'let net_db_dir = "$(NET_DB_DIR)";;'; \
	} >netuniconfig.ml

netdb_done: $(PMAP)
	mkdir -p netdb
	cd netdb && \
	        ../$(unimap_to_ocaml) -netdb ../*.pmap
	touch netdb_done

realgenclean::
	rm -rf netdb