Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 289 lines (231 sloc) 10.606 kb
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
1 #!/usr/bin/env make
fccc685 Initial open-source release
MLstate authored
2
3 # [ Warning ] don't use make to solve dependencies !!
4 #
5 # we rely on ocamlbuild which already handles them ; every rule should
6 # call it only once (no recursion)
7 #
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
8 # More info in tools/build/Makefile.bld
9
10 .PHONY: default
11 default: all
fccc685 Initial open-source release
MLstate authored
12
579a68a @Aqua-Ye [enhance] Makefile: gathering inclusions
Aqua-Ye authored
13 # Makefile inclusions
fccc685 Initial open-source release
MLstate authored
14 include config.make
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
15 include tools/build/Makefile.bld
fccc685 Initial open-source release
MLstate authored
16
1321ba9 @fperrin On FreeBSD check and use gmake, use make elsewhere
fperrin authored
17 MAKE ?= $_
fccc685 Initial open-source release
MLstate authored
18
e7282e7 [enhance] make: do not rebuild opa packages if the variable is set
Louis Gesbert authored
19 ifndef NO_REBUILD_OPA_PACKAGES
8a40e70 [feature] build: support for optional libraries, enabled libnattraver…
Louis Gesbert authored
20 OPAOPT += "--rebuild"
e7282e7 [enhance] make: do not rebuild opa packages if the variable is set
Louis Gesbert authored
21 endif
8a40e70 [feature] build: support for optional libraries, enabled libnattraver…
Louis Gesbert authored
22
23 ifneq ($(HAS_CAMLIDL)$(HAS_LIBNATPMP)$(HAS_MINIUPNPC),111)
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
24 DISABLED_LIBS = libnattraversal
8a40e70 [feature] build: support for optional libraries, enabled libnattraver…
Louis Gesbert authored
25 endif
26
fccc685 Initial open-source release
MLstate authored
27 export
28
29 ##
30 ## STANDARD TARGETS
31 ##
32
33 .PHONY: all
a54a2d4 @OpaOnWindowsNow [enhance] Makefile: manpages should be the first thing we build
OpaOnWindowsNow authored
34 all: $(MYOCAMLBUILD)
4a6014e @BourgerieQuentin [enhance] build: install the both set of packages
BourgerieQuentin authored
35 $(OCAMLBUILD) $(call target-tools,$(ALL_TOOLS)) opa-both-packages.stamp
fccc685 Initial open-source release
MLstate authored
36 @$(call copy-tools,$(ALL_TOOLS))
3e3c2e6 @jlmess77 [fix] Makefile: Use $(MAKE) instead of hardcore "make".
jlmess77 authored
37 $(MAKE) manpages
33e6901 @Aqua-Ye [fix] Makefile: re-include opa-create
Aqua-Ye authored
38 $(MAKE) $(OPA_TOOLS)
fccc685 Initial open-source release
MLstate authored
39
40 .PHONY: build
41 build: all
42
43 .PHONY: runtime-libs
44 runtime-libs: $(MYOCAMLBUILD)
45 $(OCAMLBUILD) runtime-libs.stamp
46
37c04ec [cleanup] Makefile,comments: tiny cleanup & fixes
Louis Gesbert authored
47 .PHONY: $(BUILD_DIR)/bin/opa
fccc685 Initial open-source release
MLstate authored
48 $(BUILD_DIR)/bin/opa: $(MYOCAMLBUILD)
4a6014e @BourgerieQuentin [enhance] build: install the both set of packages
BourgerieQuentin authored
49 $(OCAMLBUILD) opa-both-packages.stamp $(target-tool-opa-bin)
fccc685 Initial open-source release
MLstate authored
50 @$(copy-tool-opa-bin)
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
51 @tools/install.sh --quiet --dir $(realpath $(BUILD_DIR)) --ocaml-prefix $(OCAMLLIB)/../..
fccc685 Initial open-source release
MLstate authored
52
53 .PHONY: opa
54 opa: $(BUILD_DIR)/bin/opa
55
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
56 .PHONY: opa-flat-packages opa-node-packages opa-both-packages
4a6014e @BourgerieQuentin [enhance] build: install the both set of packages
BourgerieQuentin authored
57 opa-flat-packages: $(MYOCAMLBUILD)
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
58 $(OCAMLBUILD) opa-packages.stamp
75a4f89 @BourgerieQuentin [enhance] build: Added rules to compile stdlib to nodejs backend
BourgerieQuentin authored
59 opa-node-packages: $(MYOCAMLBUILD)
60 $(OCAMLBUILD) opa-node-packages.stamp
4a6014e @BourgerieQuentin [enhance] build: install the both set of packages
BourgerieQuentin authored
61 opa-both-packages: $(MYOCAMLBUILD)
62 $(OCAMLBUILD) opa-both-packages.stamp
fccc685 Initial open-source release
MLstate authored
63
64 .PHONY: stdlib
4a6014e @BourgerieQuentin [enhance] build: install the both set of packages
BourgerieQuentin authored
65 stdlib: opa-both-packages
66 stdlib-flat: opa-flat-packages
75a4f89 @BourgerieQuentin [enhance] build: Added rules to compile stdlib to nodejs backend
BourgerieQuentin authored
67 stdlib-node: opa-node-packages
fccc685 Initial open-source release
MLstate authored
68
11f1a77 @Aqua-Ye [fix] Makefile: re-enable opatop
Aqua-Ye authored
69 DISTRIB_TOOLS = opa-bin opa-plugin-builder-bin opa-plugin-browser-bin bslServerLib.ml opa-db-server opa-db-tool opa-cloud opatop opa-translate
fccc685 Initial open-source release
MLstate authored
70
fcef231 @cedricss [enhance] Compile: Makefile improved for opa tools. Built them before…
cedricss authored
71 OPA_TOOLS = opa-create
72
fccc685 Initial open-source release
MLstate authored
73 .PHONY: distrib
74 distrib: $(MYOCAMLBUILD)
0d63254 @Aqua-Ye [fix] Makefile: build both packages for distrib
Aqua-Ye authored
75 $(OCAMLBUILD) $(call target-tools,$(DISTRIB_TOOLS)) opa-both-packages.stamp
fccc685 Initial open-source release
MLstate authored
76 @$(call copy-tools,$(DISTRIB_TOOLS))
33e6901 @Aqua-Ye [fix] Makefile: re-include opa-create
Aqua-Ye authored
77 $(MAKE) $(OPA_TOOLS)
fccc685 Initial open-source release
MLstate authored
78
8c3019b [enhance] manpages: added target install-man to install manpages by d…
Mathieu Baudet authored
79 .PHONY: manpages
5baea24 [fix] manpages: when called from the main Makefile, do not assume 'in…
Mathieu Baudet authored
80 manpages: $(MYOCAMLBUILD)
44fea0f @Aqua-Ye [enhance] Makefile: use NO_MANPAGES on manpages target ans not for al…
Aqua-Ye authored
81 ifndef NO_MANPAGES
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
82 $(MAKE) -C tools/manpages OCAMLBUILD="$(OCAMLBUILD)" BLDDIR=../../$(BUILD_DIR)
44fea0f @Aqua-Ye [enhance] Makefile: use NO_MANPAGES on manpages target ans not for al…
Aqua-Ye authored
83 else
84 @echo "Not building manpages"
85 endif
8c3019b [enhance] manpages: added target install-man to install manpages by d…
Mathieu Baudet authored
86
2b39809 @cedricss [feature] opa-create: new tool to generate application skeletons
cedricss authored
87 .PHONY: opa-create
88 opa-create: $(MYOCAMLBUILD)
89 $(OCAMLBUILD) tools/opa-create/src/opa-create.exe
90 @$(copy-tool-opa-create)
91 .PHONY: install-opa-create
92 install-opa-create:
93 @$(install-opa-create)
94 target-tool-opa-create = tools/opa-create/src/opa-create.exe
95 copy-tool-opa-create = mkdir -p $(BUILD_DIR)/bin && $(INSTALL) $(BUILD_DIR)/tools/opa-create/src/opa-create.exe $(BUILD_DIR)/bin/opa-create
96 install-opa-create = mkdir -p $(PREFIX)/bin && $(INSTALL) $(BUILD_DIR)/bin/opa-create $(INSTALL_DIR)/bin/opa-create
97
98
fccc685 Initial open-source release
MLstate authored
99 ##
100 ## INSTALLATION
101 ##
102
103 .PHONY: install*
104
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
105 STDLIB_DIR = $(INSTALL_DIR)/lib/opa/stdlib
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
106
107 FLAT_STDLIB_SUFFIX_DIR=stdlib.qmlflat
108 STDLIB_FLAT_DIR=$(STDLIB_DIR)/$(FLAT_STDLIB_SUFFIX_DIR)
109 BUILD_FLAT_DIR=$(BUILD_DIR)/$(FLAT_STDLIB_SUFFIX_DIR)
fccc685 Initial open-source release
MLstate authored
110 define install-package
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
111 @printf "Installing into $(STDLIB_FLAT_DIR)/$*.opx\r"
112 @mkdir -p "$(STDLIB_FLAT_DIR)/$*.opx/_build"
113 @find "$(BUILD_FLAT_DIR)/$*.opx" -maxdepth 1 ! -type d -exec $(INSTALL) {} "$(STDLIB_FLAT_DIR)/$*.opx/" \;
114 @$(INSTALL) $(BUILD_FLAT_DIR)/$*.opx/_build/*.a "$(STDLIB_FLAT_DIR)/$*.opx/_build/"
115 @$(INSTALL) $(BUILD_FLAT_DIR)/$*.opx/_build/*.cmi "$(STDLIB_FLAT_DIR)/$*.opx/_build/"
116 @$(INSTALL) $(BUILD_FLAT_DIR)/$*.opx/_build/*.cmxa "$(STDLIB_FLAT_DIR)/$*.opx/_build/"
117 endef
118
119 NODE_STDLIB_SUFFIX_DIR=stdlib.qmljs
120 STDLIB_NODE_DIR=$(STDLIB_DIR)/$(NODE_STDLIB_SUFFIX_DIR)
121 BUILD_NODE_DIR=$(BUILD_DIR)/$(NODE_STDLIB_SUFFIX_DIR)
122 define install-node-package
123 @printf "Installing into $(STDLIB_NODE_DIR)/$*.opx\r"
124 @mkdir -p "$(STDLIB_NODE_DIR)/$*.opx/_build"
125 @find "$(BUILD_NODE_DIR)/$*.opx" -maxdepth 1 ! -type d -exec $(INSTALL) {} "$(STDLIB_NODE_DIR)/$*.opx/" \;
126 @$(INSTALL) $(BUILD_NODE_DIR)/$*.opx/*.js "$(STDLIB_NODE_DIR)/$*.opx/"
fccc685 Initial open-source release
MLstate authored
127 endef
128
2f55085 @OpaOnWindowsNow [fix] Makefile: install plugins
OpaOnWindowsNow authored
129 define install-plugin
130 @printf "Installing into $(STDLIB_DIR)/$*.opp^[[K\r"
032f272 @arthuraa [enhance] install: raw js files.
arthuraa authored
131 @mkdir -p "$(STDLIB_DIR)/$*.opp"
8371716 @BourgerieQuentin [fix] plugins: Install and searching
BourgerieQuentin authored
132 @$(INSTALL) $(BUILD_DIR)/$*.opp/*.bypass "$(STDLIB_DIR)/$*.opp/";
032f272 @arthuraa [enhance] install: raw js files.
arthuraa authored
133 @for f in `find "$(BUILD_DIR)/$*.opp" -mindepth 2 -iname \*.\*js`; do \
134 nf=`basename $$f | sed 's/[^_]*_\(.*\)/\1/'`; $(INSTALL) $$f "$(STDLIB_DIR)/$*.opp/$$nf"; done
cca9d9c @BourgerieQuentin [fix] build: Install *MLRuntime*
BourgerieQuentin authored
135 @$(if $(wildcard $(BUILD_DIR)/$*.opp/*MLRuntime.*), $(INSTALL) $(BUILD_DIR)/$*.opp/*MLRuntime.* "$(STDLIB_DIR)/$*.opp/")
2f55085 @OpaOnWindowsNow [fix] Makefile: install plugins
OpaOnWindowsNow authored
136 endef
137
138
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
139 # List all packages and plugins in stdlib
140 OPA_PACKAGES := $(shell cd lib/stdlib && ./all_packages.sh)
141 OPA_PLUGINS := $(shell cd lib/stdlib && ./all_plugins.sh)
fccc685 Initial open-source release
MLstate authored
142
143 # Rules installing everything that has been compiled
144 #
145 # This doesn't rely on install rules generated by Makefile.bld ;
146 # instead it assumes that what you want to install has been properly
8c3019b [enhance] manpages: added target install-man to install manpages by d…
Mathieu Baudet authored
147 # put in $(BUILD_DIR)/{bin,lib/opa,share/opa,share/man}.
fccc685 Initial open-source release
MLstate authored
148 #
149 # This is the case of tools (because of Makefile.bld),
150 # and of opa runtime libs (because build rules copy them
151 # to $(BUILD_DIR)/lib/opa/static).
152 # This doesn't install the other libs though, use target install-libs
153 # for that
154
155 install-packageopt-%:
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
156 $(if $(wildcard $(BUILD_FLAT_DIR)/$*.opx/_build/*),$(install-package))
157
158 install-node-packageopt-%:
159 $(if $(wildcard $(BUILD_NODE_DIR)/$*.opx/*.js),$(install-node-package))
fccc685 Initial open-source release
MLstate authored
160
161 install-package-%:
162 $(install-package)
163
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
164 install-node-package-%:
165 $(install-node-package)
166
fccc685 Initial open-source release
MLstate authored
167 install-packages: $(addprefix install-packageopt-,$(OPA_PACKAGES))
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
168 @printf "Installation to $(STDLIB_FLAT_DIR) done.\n"
169
170 install-node-packages: $(addprefix install-node-packageopt-,$(OPA_PACKAGES))
171 @printf "Installation to $(STDLIB_NODE_DIR) done.\n"
fccc685 Initial open-source release
MLstate authored
172
173 install-all-packages: $(addprefix install-package-,$(OPA_PACKAGES))
662e95e @BourgerieQuentin [enhance] compiler, packages: Allows to have several backends (separa…
BourgerieQuentin authored
174 @printf "Installation to $(STDLIB_FLAT_DIR) done.\n"
fccc685 Initial open-source release
MLstate authored
175
2f55085 @OpaOnWindowsNow [fix] Makefile: install plugins
OpaOnWindowsNow authored
176 install-pluginopt-%:
177 $(if $(wildcard $(BUILD_DIR)/$*.opp/),$(install-plugin))
178
179 install-plugin-%:
180 $(install-plugin)
181
182 install-plugins: $(addprefix install-pluginopt-,$(OPA_PLUGINS))
183 @printf "Installation to $(STDLIB_DIR) done.\n"
184
185 install-all-plugins: $(addprefix install-plugin-,$(OPA_PLUGINS))
186 @printf "Installation to $(STDLIB_DIR) done.\n"
187
188
189
fcef231 @cedricss [enhance] Compile: Makefile improved for opa tools. Built them before…
cedricss authored
190 install-bin:
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
191 @printf "Installing into $(INSTALL_DIR)/bin\r"
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
192 @mkdir -p $(INSTALL_DIR)/bin
193 @$(if $(wildcard $(BUILD_DIR)/bin/*),$(INSTALL) -r $(BUILD_DIR)/bin/* $(INSTALL_DIR)/bin)
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
194 @tools/install.sh --quiet --dir $(INSTALL_DIR) --ocamllib $(OCAMLLIB) --ocamlopt $(OCAMLOPT)
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
195 @printf "Installation to $(INSTALL_DIR)/bin done.\n"
fccc685 Initial open-source release
MLstate authored
196
197 install-lib:
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
198 @printf "Installing into $(INSTALL_DIR)/lib/opa\r"
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
199 @mkdir -p $(INSTALL_DIR)/lib/opa
200 @$(if $(wildcard $(BUILD_DIR)/lib/opa/*),$(INSTALL) -r $(BUILD_DIR)/lib/opa/* $(INSTALL_DIR)/lib/opa/)
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
201 @printf "Installation to $(INSTALL_DIR)/lib/opa done.\n"
fccc685 Initial open-source release
MLstate authored
202
203 install-share:
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
204 @printf "Installing into $(INSTALL_DIR)/share/opa\r"
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
205 @mkdir -p $(INSTALL_DIR)/share/opa
206 @$(if $(wildcard $(BUILD_DIR)/share/opa/*),$(INSTALL) -r $(BUILD_DIR)/share/opa/* $(INSTALL_DIR)/share/opa/)
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
207 @printf "Installation to $(INSTALL_DIR)/share/opa done.\n"
fccc685 Initial open-source release
MLstate authored
208
8c3019b [enhance] manpages: added target install-man to install manpages by d…
Mathieu Baudet authored
209 install-man:
210 @printf "Installing into $(INSTALL_DIR)/share/man\r"
211 @if [ -d $(BUILD_DIR)/man/man1 ]; then \
212 mkdir -p $(INSTALL_DIR)/share/man/man1; \
213 $(INSTALL) -r $(BUILD_DIR)/man/man1/*.1 $(INSTALL_DIR)/share/man/man1; \
214 fi
215 @printf "Installation to $(INSTALL_DIR)/share/man done.\n"
216
4a6014e @BourgerieQuentin [enhance] build: install the both set of packages
BourgerieQuentin authored
217 install: install-bin install-lib install-share install-plugins install-packages install-node-packages install-man
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
218 @printf "Installation into $(INSTALL_DIR) done.\n"
fccc685 Initial open-source release
MLstate authored
219
465b551 @Aqua-Ye [enhance] build: added option to not install ocaml
Aqua-Ye authored
220 install-node: install-bin install-lib install-share install-plugins install-node-packages install-man
221 @printf "Installation into $(INSTALL_DIR) done.\n"
222
fccc685 Initial open-source release
MLstate authored
223 .PHONY: uninstall
224 uninstall:
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
225 rm -rf $(INSTALL_DIR)/lib/opa
226 @[ ! -d $(INSTALL_DIR)/lib ] || [ -n "`ls -A $(INSTALL_DIR)/lib`" ] || rmdir $(INSTALL_DIR)/lib
227 rm -rf $(INSTALL_DIR)/share/opa
228 rm -rf $(INSTALL_DIR)/share/doc/opa
229 @[ ! -d $(INSTALL_DIR)/share ] || [ -n "`ls -A $(INSTALL_DIR)/share`" ] || rmdir $(INSTALL_DIR)/share
1b2772b [fix] Makefile: zealous uninstall
Louis Gesbert authored
230 $(foreach file,$(wildcard $(BUILD_DIR)/bin/*),rm -f $(INSTALL_DIR)/bin/$(notdir $(file));)
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
231 @tools/install.sh --uninstall --dir $(INSTALL_DIR)
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
232 @[ ! -d $(INSTALL_DIR)/bin ] || [ -n "`ls -A $(INSTALL_DIR)/bin`" ] || rmdir $(INSTALL_DIR)/bin
8037018 [fix] Makefiles: using a more portable printf instead of echo
Louis Gesbert authored
233 @printf "Uninstall done.\n"
fccc685 Initial open-source release
MLstate authored
234
235 # Install our ocamlbuild-generation engine
236 install-bld:
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
237 @mkdir -p $(INSTALL_DIR)/bin
22b433a @fperrin Don't assume that bash is in /bin
fperrin authored
238 @echo "#!/usr/bin/env bash" > $(INSTALL_DIR)/bin/bld
239 @echo "set -e" >> $(INSTALL_DIR)/bin/bld
240 @echo "set -u" >> $(INSTALL_DIR)/bin/bld
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
241 @chmod 755 $(INSTALL_DIR)/bin/bld
242 @echo "BLDDIR=$(PREFIX)/share/opa/bld $(PREFIX)/share/opa/bld/gen_myocamlbuild.sh" >> $(INSTALL_DIR)/bin/bld
243 @echo "_build/myocamlbuild -no-plugin -j 6 \"\$$@\"" >> $(INSTALL_DIR)/bin/bld
244 @mkdir -p $(INSTALL_DIR)/share/opa/bld
fccc685 Initial open-source release
MLstate authored
245 @$(INSTALL) build/gen_myocamlbuild.sh build/myocamlbuild_*fix.ml config.sh config.mli config.ml\
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
246 $(INSTALL_DIR)/share/opa/bld
fccc685 Initial open-source release
MLstate authored
247
248 # Install an opa wrapper with different stdlib and options (for some backwards-compatibility)
249 install-qmlflat: # depends on opabsl_for_compiler, but we don't want to run ocamlbuild twice
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
250 @mkdir -p $(INSTALL_DIR)/bin $(INSTALL_DIR)/share/opa/mlstatebsl
251 @$(INSTALL) $(BUILD_DIR)/opabsl/mlstatebsl/opabslgen_*.opa $(INSTALL_DIR)/share/opa/mlstatebsl
22b433a @fperrin Don't assume that bash is in /bin
fperrin authored
252 @echo "#!/usr/bin/env bash" > $(INSTALL_DIR)/bin/qmlflat
253 @echo "set -e" >> $(INSTALL_DIR)/bin/qmlflat
254 @echo "set -u" >> $(INSTALL_DIR)/bin/qmlflat
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
255 @chmod 755 $(INSTALL_DIR)/bin/qmlflat
84c2f7f @BourgerieQuentin [fix] compilers: derived compiler should also handle syntax options.
BourgerieQuentin authored
256 @echo 'exec opa --parser classic --no-stdlib --no-server --no-cps --no-closure --no-ei --no-constant-sharing --no-undot --separated off --value-restriction disabled --no-warn duplicateL0 --no-warn typer.warncoerce --no-warn unused --no-discard-of-unused-stdlib --no-warn pattern $$(if ! grep -qE "(^| )--no-stdlib( |$$)" <<<"$$*"; then echo $(shell sed "s%^[^# ]\+%$(PREFIX)/share/opa/mlstatebsl/opabslgen_&%; t OK; d; :OK" opabsl/mlstatebsl/bsl-sources); fi) "$$@"' \
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
257 >> $(INSTALL_DIR)/bin/qmlflat
fccc685 Initial open-source release
MLstate authored
258
259 # installs some dev tools on top of the normal install; these should not change often
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
260 install-all: install install-bld install-qmlflat tools/maxmem
894a751 @delroth Support make DESTDIR=... install for easier packaging
delroth authored
261 @$(INSTALL) platform_helper.sh $(INSTALL_DIR)/bin/
d863cc7 @Aqua-Ye [enhance] all: wip compilation
Aqua-Ye authored
262 @$(INSTALL) tools/maxmem $(INSTALL_DIR)/bin/
263 @rm tools/maxmem
264 @$(INSTALL) tools/plotmem $(INSTALL_DIR)/bin/
fccc685 Initial open-source release
MLstate authored
265
266 ##
267 ## DOCUMENTATION
268 ##
269 # (in this section, multiple calls to ocamlbuild are tolerated)
270
271 .PHONY: doc.jsbsl
272 doc.jsbsl: $(MYOCAMLBUILD)
273 $(OCAMLBUILD) $@/index.html
274
275 # this rules provides the doc.html target (from Makefile.bld)
276 # the sed are just there to help sorting by filename-within-directory
277 .PHONY: doc.odocl
278 doc.odocl:
279 echo $(foreach lib,$(ALL_LIBS),$(lib-cmi-$(lib):%.cmi=%)) \
280 | sed 's# \+#\n#g' \
281 | sed 's#\(.*\)/\([^/]*\)#\1 \2#' \
282 | sort -k 2 -u \
283 | sed 's#\(.*\) \([^ ]*\)#\1/\2#' \
284 >$@
285
286 .PHONY: packages-api
287 packages-api: $(MYOCAMLBUILD)
5e9da00 @BourgerieQuentin [enhance] compiler, syntax: Default syntax is now js-like
BourgerieQuentin authored
288 OPAOPT="$(OPAOPT) --rebuild --api --parser classic" $(OCAMLBUILD) opa-packages.stamp
Something went wrong with that request. Please try again.