@@ -27,7 +27,7 @@ SOURCES_NUM_TOP=\
27
27
$(addsuffix .mli,$(MODULES_NUM_TOP ) ) $(addsuffix .ml,$(MODULES_NUM_TOP ) )
28
28
CMOS_NUM_TOP =$(addsuffix .cmo,$(MODULES_NUM_TOP ) )
29
29
30
- all :: libnums.$(A ) nums.cma num_top.cma META.legacy META.modern META.top \
30
+ all :: libnums.$(A ) nums.cma num_top.cma META.num META.top \
31
31
num-legacy.install num-modern.install
32
32
33
33
ifeq "$(NATIVE_COMPILER ) " "true"
@@ -42,16 +42,12 @@ META.top: META.num-top.in
42
42
echo ' version = "$(VERSION)"' > $@
43
43
cat $^ >> $@
44
44
45
- META.% :
45
+ META.num :
46
46
@echo ' requires = "num.core"' > $@
47
47
@echo ' requires(toploop) = "num.core,num-top"' >> $@
48
48
@echo ' version = "$(VERSION)"' >> $@
49
49
@echo ' description = "Arbitrary-precision rational arithmetic"' >> $@
50
50
@echo ' package "core" (' >> $@
51
- # META.legacy installs num to the OCaml standard library directory so requires
52
- # the extra directory line. META.modern installs num as a standard findlib
53
- # package.
54
- @echo ' directory = "^"' >> $(if $(*:legacy=),/dev/null,$@)
55
51
@echo ' version = "$(VERSION)"' >> $@
56
52
@echo ' browse_interfaces = ""' >> $@
57
53
@echo ' archive(byte) = "nums.cma"' >> $@
@@ -118,14 +114,13 @@ TOINSTALL_NUM_TOP=num_top.cma $(addsuffix .cmi,$(MODULES_NUM_TOP))
118
114
# - num artefacts to ocaml/ (legacy only)
119
115
# libexec_root section
120
116
# - nums.cmxs (legacy only)
121
- # - dllnums.so to ocaml/stublibs/ (legacy only)
122
117
# lib section:
123
118
# - num META file
124
- # - num artefacts (modern only)
119
+ # - num artefacts
125
120
# libexec section:
126
121
# - nums.cmxs (modern only)
127
122
# stublibs section:
128
- # - dllnums.so (modern only)
123
+ # - dllnums.so
129
124
define GENERATE_INSTALL_FILE
130
125
num-$1.install:
131
126
@echo 'lib_root: [' > $$@
@@ -139,13 +134,10 @@ $(foreach file,$(TOINSTALL),
139
134
@echo 'libexec_root: [' >> $$@
140
135
$(foreach file,$(TOINSTALL_CMXS),
141
136
@echo ' "src/$(file)" {"ocaml/$(file)"}' >> $$@)
142
- $(foreach file,$(TOINSTALL_STUBS),
143
- @echo ' "src/$(file)" {"ocaml/stublibs/$(file)"}' >> $$@)
144
137
endif
145
138
@echo ']' >> $$@
146
139
@echo 'lib: [' >> $$@
147
- @echo ' "src/META.$(1 ) " {"META"}' >> $$@
148
- ifeq "$(1 ) " "modern"
140
+ @echo ' "src/META.num" {"META"}' >> $$@
149
141
$(foreach file,$(TOINSTALL ) ,
150
142
@echo ' "src/$(file ) "' >> $$@ )
151
143
@echo ']' >> $$@
@@ -156,7 +148,6 @@ $(foreach file,$(TOINSTALL_CMXS),
156
148
@echo 'stublibs: [' >> $$@
157
149
$(foreach file,$(TOINSTALL_STUBS ) ,
158
150
@echo ' "src/$(file ) "' >> $$@ )
159
- endif
160
151
@echo ']' >> $$@
161
152
endef
162
153
@@ -165,7 +156,7 @@ $(eval $(call GENERATE_INSTALL_FILE,modern))
165
156
166
157
install : num-top-install
167
158
$(INSTALL_DIR ) $(DESTDIR )$(STDLIBDIR )
168
- cp META.legacy META
159
+ cp META.num META
169
160
$(OCAMLFIND ) install num META
170
161
rm -f META
171
162
$(INSTALL_DATA ) $(TOINSTALL ) $(DESTDIR )$(STDLIBDIR )
@@ -183,7 +174,7 @@ num-top-install:
183
174
rm -f META
184
175
185
176
findlib-install : num-top-install
186
- cp META.modern META
177
+ cp META.num META
187
178
$(OCAMLFIND ) install num META $(TOINSTALL ) $(TOINSTALL_CMXS ) $(TOINSTALL_STUBS )
188
179
rm -f META
189
180
@@ -201,7 +192,7 @@ endif
201
192
202
193
clean :
203
194
rm -f * .cm[ioxta] * .cmx[as] * .cmti * .$(O ) * .$(A ) * $(EXT_DLL ) \
204
- META.top META.legacy META.modern $(SOURCES_NUM_TOP) \
195
+ META.top META.num $(SOURCES_NUM_TOP) \
205
196
num-legacy.install num-modern.install
206
197
207
198
$(SOURCES_NUM_TOP:num_ =%): $(addprefix ../toplevel/,$(SOURCES_NUM_TOP ) )
0 commit comments