Skip to content
This repository
Newer
Older
100644 318 lines (254 sloc) 11.29 kb
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
1 #!/usr/bin/env make
fccc6851 » MLstate
2011-06-21 Initial open-source release
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 #
2cac7a39 » Aqua-Ye
2012-07-13 [doc] README, Makefile: small update
8 # More info in tools/build/Makefile.bld and tools/build/README
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
9
10 .PHONY: default
bc046f3e » Aqua-Ye
2012-07-18 [enhance] Makefile: only compile node packages by default
11 default: node
fccc6851 » MLstate
2011-06-21 Initial open-source release
12
94ed07bc » Aqua-Ye
2012-07-10 [enhance] build: moved config files in tools/build
13 CONFIG_PATH = tools/build
14
15 include $(CONFIG_PATH)/config.make
fccc6851 » MLstate
2011-06-21 Initial open-source release
16
1321ba91 » Frédéric Perrin
2011-09-21 On FreeBSD check and use gmake, use make elsewhere
17 MAKE ?= $_
6a0b86b5 » Aqua-Ye
2012-07-12 [cleanup] Makefile, Makefile.bld: some cleanup, and factorize OCAMLBU…
18 OCAMLBUILD_OPT ?= -j 6
fccc6851 » MLstate
2011-06-21 Initial open-source release
19
e7282e73 » Louis Gesbert
2011-07-06 [enhance] make: do not rebuild opa packages if the variable is set
20 ifndef NO_REBUILD_OPA_PACKAGES
42668dc5 » Aqua-Ye
2012-07-18 [enhance] Makefile: packages-api only constructs node API
21 OPAOPT += --rebuild
e7282e73 » Louis Gesbert
2011-07-06 [enhance] make: do not rebuild opa packages if the variable is set
22 endif
8a40e707 » Louis Gesbert
2011-06-24 [feature] build: support for optional libraries, enabled libnattraver…
23
24 ifneq ($(HAS_CAMLIDL)$(HAS_LIBNATPMP)$(HAS_MINIUPNPC),111)
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
25 DISABLED_LIBS = libnattraversal
8a40e707 » Louis Gesbert
2011-06-24 [feature] build: support for optional libraries, enabled libnattraver…
26 endif
27
fccc6851 » MLstate
2011-06-21 Initial open-source release
28 export
29
6d1dcea4 » Aqua-Ye
2012-07-11 [fix] Makefile: carefull with makefiles inclusion
30 include tools/build/Makefile.bld
31
fccc6851 » MLstate
2011-06-21 Initial open-source release
32 ##
33 ## STANDARD TARGETS
34 ##
35
bc046f3e » Aqua-Ye
2012-07-18 [enhance] Makefile: only compile node packages by default
36 .PHONY: node
37 node: $(MYOCAMLBUILD)
38 $(OCAMLBUILD) $(call target-tools,$(ALL_TOOLS)) opa-node-packages.stamp
39 @$(call copy-tools,$(ALL_TOOLS))
40 $(MAKE) manpages
41 $(MAKE) $(OPA_TOOLS)
42
fccc6851 » MLstate
2011-06-21 Initial open-source release
43 .PHONY: all
a54a2d4e » OpaOnWindowsNow
2012-03-14 [enhance] Makefile: manpages should be the first thing we build
44 all: $(MYOCAMLBUILD)
4a6014e6 » BourgerieQuentin
2012-06-18 [enhance] build: install the both set of packages
45 $(OCAMLBUILD) $(call target-tools,$(ALL_TOOLS)) opa-both-packages.stamp
fccc6851 » MLstate
2011-06-21 Initial open-source release
46 @$(call copy-tools,$(ALL_TOOLS))
3e3c2e6a » jlmess77
2012-03-29 [fix] Makefile: Use $(MAKE) instead of hardcore "make".
47 $(MAKE) manpages
33e69010 » Aqua-Ye
2012-06-21 [fix] Makefile: re-include opa-create
48 $(MAKE) $(OPA_TOOLS)
fccc6851 » MLstate
2011-06-21 Initial open-source release
49
50 .PHONY: build
51 build: all
52
53 .PHONY: runtime-libs
54 runtime-libs: $(MYOCAMLBUILD)
55 $(OCAMLBUILD) runtime-libs.stamp
56
37c04ece » Louis Gesbert
2011-06-28 [cleanup] Makefile,comments: tiny cleanup & fixes
57 .PHONY: $(BUILD_DIR)/bin/opa
fccc6851 » MLstate
2011-06-21 Initial open-source release
58 $(BUILD_DIR)/bin/opa: $(MYOCAMLBUILD)
bc046f3e » Aqua-Ye
2012-07-18 [enhance] Makefile: only compile node packages by default
59 $(OCAMLBUILD) opa-node-packages.stamp $(target-tool-opa-bin)
fccc6851 » MLstate
2011-06-21 Initial open-source release
60 @$(copy-tool-opa-bin)
78a50276 » Aqua-Ye
2012-07-06 [enhance] install: moving some indstall scripts to appropriate direct…
61 @tools/utils/install.sh --quiet --dir $(realpath $(BUILD_DIR)) --ocaml-prefix $(OCAMLLIB)/../../..
fccc6851 » MLstate
2011-06-21 Initial open-source release
62
63 .PHONY: opa
64 opa: $(BUILD_DIR)/bin/opa
65
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
66 .PHONY: opa-flat-packages opa-node-packages opa-both-packages
4a6014e6 » BourgerieQuentin
2012-06-18 [enhance] build: install the both set of packages
67 opa-flat-packages: $(MYOCAMLBUILD)
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
68 $(OCAMLBUILD) opa-packages.stamp
75a4f890 » BourgerieQuentin
2012-06-28 [enhance] build: Added rules to compile stdlib to nodejs backend
69 opa-node-packages: $(MYOCAMLBUILD)
70 $(OCAMLBUILD) opa-node-packages.stamp
4a6014e6 » BourgerieQuentin
2012-06-18 [enhance] build: install the both set of packages
71 opa-both-packages: $(MYOCAMLBUILD)
72 $(OCAMLBUILD) opa-both-packages.stamp
fccc6851 » MLstate
2011-06-21 Initial open-source release
73
56f53525 » Aqua-Ye
2012-07-12 [enhance] Makefile: missing .PHONY
74 .PHONY: stdlib stdlib-flat stdlib-node
4a6014e6 » BourgerieQuentin
2012-06-18 [enhance] build: install the both set of packages
75 stdlib: opa-both-packages
76 stdlib-flat: opa-flat-packages
75a4f890 » BourgerieQuentin
2012-06-28 [enhance] build: Added rules to compile stdlib to nodejs backend
77 stdlib-node: opa-node-packages
fccc6851 » MLstate
2011-06-21 Initial open-source release
78
4f1de8b8 » Aqua-Ye
2012-07-13 [enhance] Makefile: reduced the number of DISTRIB_TOOLS
79 DISTRIB_TOOLS = opa-bin opa-plugin-builder-bin opa-plugin-browser-bin bslServerLib.ml opa-cloud # opa-db-server opa-db-tool opatop opa-translate
fccc6851 » MLstate
2011-06-21 Initial open-source release
80
fcef2313 » cedricss
2012-06-11 [enhance] Compile: Makefile improved for opa tools. Built them before…
81 OPA_TOOLS = opa-create
82
fccc6851 » MLstate
2011-06-21 Initial open-source release
83 .PHONY: distrib
84 distrib: $(MYOCAMLBUILD)
bc046f3e » Aqua-Ye
2012-07-18 [enhance] Makefile: only compile node packages by default
85 $(OCAMLBUILD) $(call target-tools,$(DISTRIB_TOOLS)) opa-node-packages.stamp
86 @$(call copy-tools,$(DISTRIB_TOOLS))
87 $(MAKE) manpages
88 $(MAKE) $(OPA_TOOLS)
89
90 .PHONY: distrib-all
91 distrib-all: $(MYOCAMLBUILD)
0d63254c » Aqua-Ye
2012-06-18 [fix] Makefile: build both packages for distrib
92 $(OCAMLBUILD) $(call target-tools,$(DISTRIB_TOOLS)) opa-both-packages.stamp
fccc6851 » MLstate
2011-06-21 Initial open-source release
93 @$(call copy-tools,$(DISTRIB_TOOLS))
0fc79b4b » Aqua-Ye
2012-07-13 [enhance] Makefile: also make manpages for distrib
94 $(MAKE) manpages
33e69010 » Aqua-Ye
2012-06-21 [fix] Makefile: re-include opa-create
95 $(MAKE) $(OPA_TOOLS)
fccc6851 » MLstate
2011-06-21 Initial open-source release
96
6a0b86b5 » Aqua-Ye
2012-07-12 [cleanup] Makefile, Makefile.bld: some cleanup, and factorize OCAMLBU…
97 ##
98 ## MANPAGES
99 ##
100
8c3019bb » Mathieu Baudet
2012-01-05 [enhance] manpages: added target install-man to install manpages by d…
101 .PHONY: manpages
5baea24c » Mathieu Baudet
2012-01-05 [fix] manpages: when called from the main Makefile, do not assume 'in…
102 manpages: $(MYOCAMLBUILD)
44fea0f5 » Aqua-Ye
2012-06-28 [enhance] Makefile: use NO_MANPAGES on manpages target ans not for al…
103 ifndef NO_MANPAGES
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
104 $(MAKE) -C tools/manpages OCAMLBUILD="$(OCAMLBUILD)" BLDDIR=../../$(BUILD_DIR)
44fea0f5 » Aqua-Ye
2012-06-28 [enhance] Makefile: use NO_MANPAGES on manpages target ans not for al…
105 else
106 @echo "Not building manpages"
107 endif
8c3019bb » Mathieu Baudet
2012-01-05 [enhance] manpages: added target install-man to install manpages by d…
108
6a0b86b5 » Aqua-Ye
2012-07-12 [cleanup] Makefile, Makefile.bld: some cleanup, and factorize OCAMLBU…
109 ##
110 ## OPA-CREATE
111 ##
112
113 target-tool-opa-create = tools/opa-create/src/opa-create.exe
114
2b398098 » cedricss
2012-06-06 [feature] opa-create: new tool to generate application skeletons
115 .PHONY: opa-create
116 opa-create: $(MYOCAMLBUILD)
6a0b86b5 » Aqua-Ye
2012-07-12 [cleanup] Makefile, Makefile.bld: some cleanup, and factorize OCAMLBU…
117 $(OCAMLBUILD) $(target-tool-opa-create)
118 @mkdir -p $(BUILD_DIR)/bin
119 $(INSTALL) $(BUILD_DIR)/$(target-tool-opa-create) $(BUILD_DIR)/bin/opa-create
120
2b398098 » cedricss
2012-06-06 [feature] opa-create: new tool to generate application skeletons
121 .PHONY: install-opa-create
122 install-opa-create:
6a0b86b5 » Aqua-Ye
2012-07-12 [cleanup] Makefile, Makefile.bld: some cleanup, and factorize OCAMLBU…
123 @mkdir -p $(PREFIX)/bin
124 $(INSTALL) $(BUILD_DIR)/bin/opa-create $(INSTALL_DIR)/bin/opa-create
2b398098 » cedricss
2012-06-06 [feature] opa-create: new tool to generate application skeletons
125
fccc6851 » MLstate
2011-06-21 Initial open-source release
126 ##
127 ## INSTALLATION
128 ##
129
130 .PHONY: install*
131
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
132 STDLIB_DIR = $(INSTALL_DIR)/lib/opa/stdlib
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
133
134 FLAT_STDLIB_SUFFIX_DIR=stdlib.qmlflat
135 STDLIB_FLAT_DIR=$(STDLIB_DIR)/$(FLAT_STDLIB_SUFFIX_DIR)
136 BUILD_FLAT_DIR=$(BUILD_DIR)/$(FLAT_STDLIB_SUFFIX_DIR)
fccc6851 » MLstate
2011-06-21 Initial open-source release
137 define install-package
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
138 @printf "Installing into $(STDLIB_FLAT_DIR)/$*.opx\r"
139 @mkdir -p "$(STDLIB_FLAT_DIR)/$*.opx/_build"
140 @find "$(BUILD_FLAT_DIR)/$*.opx" -maxdepth 1 ! -type d -exec $(INSTALL) {} "$(STDLIB_FLAT_DIR)/$*.opx/" \;
141 @$(INSTALL) $(BUILD_FLAT_DIR)/$*.opx/_build/*.a "$(STDLIB_FLAT_DIR)/$*.opx/_build/"
142 @$(INSTALL) $(BUILD_FLAT_DIR)/$*.opx/_build/*.cmi "$(STDLIB_FLAT_DIR)/$*.opx/_build/"
143 @$(INSTALL) $(BUILD_FLAT_DIR)/$*.opx/_build/*.cmxa "$(STDLIB_FLAT_DIR)/$*.opx/_build/"
144 endef
145
146 NODE_STDLIB_SUFFIX_DIR=stdlib.qmljs
147 STDLIB_NODE_DIR=$(STDLIB_DIR)/$(NODE_STDLIB_SUFFIX_DIR)
148 BUILD_NODE_DIR=$(BUILD_DIR)/$(NODE_STDLIB_SUFFIX_DIR)
149 define install-node-package
150 @printf "Installing into $(STDLIB_NODE_DIR)/$*.opx\r"
151 @mkdir -p "$(STDLIB_NODE_DIR)/$*.opx/_build"
152 @find "$(BUILD_NODE_DIR)/$*.opx" -maxdepth 1 ! -type d -exec $(INSTALL) {} "$(STDLIB_NODE_DIR)/$*.opx/" \;
153 @$(INSTALL) $(BUILD_NODE_DIR)/$*.opx/*.js "$(STDLIB_NODE_DIR)/$*.opx/"
fccc6851 » MLstate
2011-06-21 Initial open-source release
154 endef
155
2fae9ee3 » Aqua-Ye
2012-07-12 [fix] Makefile: plugins were not install because of wrong path
156 PLUGINS_DIR=lib/plugins
2f550855 » OpaOnWindowsNow
2011-10-21 [fix] Makefile: install plugins
157 define install-plugin
158 @printf "Installing into $(STDLIB_DIR)/$*.opp^[[K\r"
032f272f » arthuraa
2012-06-28 [enhance] install: raw js files.
159 @mkdir -p "$(STDLIB_DIR)/$*.opp"
2fae9ee3 » Aqua-Ye
2012-07-12 [fix] Makefile: plugins were not install because of wrong path
160 @$(INSTALL) $(BUILD_DIR)/$(PLUGINS_DIR)/$*.opp/*.bypass "$(STDLIB_DIR)/$*.opp/";
a367cd23 » arthuraa
2012-07-03 [enhance] bslregister: output nodejs package.
161 @$(INSTALL) $(BUILD_DIR)/$(PLUGINS_DIR)/$*.opp/*NodeJsPackage.js "$(STDLIB_DIR)/$*.opp/";
2dbcceff » arthuraa
2012-07-11 [enhance] qml2js: output package.json for plugins.
162 @$(INSTALL) $(BUILD_DIR)/$(PLUGINS_DIR)/$*.opp/package.json "$(STDLIB_DIR)/$*.opp/";
cb3418ee » arthuraa
2012-07-13 [fix] build: plugin install command.
163 @$(if $(wildcard $(BUILD_DIR)/$(PLUGINS_DIR)/$*.opp/*MLRuntime.*), $(INSTALL) $(BUILD_DIR)/$(PLUGINS_DIR)/$*.opp/*MLRuntime.* "$(STDLIB_DIR)/$*.opp/")
2f550855 » OpaOnWindowsNow
2011-10-21 [fix] Makefile: install plugins
164 endef
165
166
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
167 # List all packages and plugins in stdlib
168 OPA_PACKAGES := $(shell cd lib/stdlib && ./all_packages.sh)
169 OPA_PLUGINS := $(shell cd lib/stdlib && ./all_plugins.sh)
fccc6851 » MLstate
2011-06-21 Initial open-source release
170
171 # Rules installing everything that has been compiled
172 #
173 # This doesn't rely on install rules generated by Makefile.bld ;
174 # instead it assumes that what you want to install has been properly
8c3019bb » Mathieu Baudet
2012-01-05 [enhance] manpages: added target install-man to install manpages by d…
175 # put in $(BUILD_DIR)/{bin,lib/opa,share/opa,share/man}.
fccc6851 » MLstate
2011-06-21 Initial open-source release
176 #
177 # This is the case of tools (because of Makefile.bld),
178 # and of opa runtime libs (because build rules copy them
179 # to $(BUILD_DIR)/lib/opa/static).
180 # This doesn't install the other libs though, use target install-libs
181 # for that
182
183 install-packageopt-%:
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
184 $(if $(wildcard $(BUILD_FLAT_DIR)/$*.opx/_build/*),$(install-package))
185
186 install-node-packageopt-%:
187 $(if $(wildcard $(BUILD_NODE_DIR)/$*.opx/*.js),$(install-node-package))
fccc6851 » MLstate
2011-06-21 Initial open-source release
188
189 install-package-%:
190 $(install-package)
191
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
192 install-node-package-%:
193 $(install-node-package)
194
fccc6851 » MLstate
2011-06-21 Initial open-source release
195 install-packages: $(addprefix install-packageopt-,$(OPA_PACKAGES))
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
196 @printf "Installation to $(STDLIB_FLAT_DIR) done.\n"
197
198 install-node-packages: $(addprefix install-node-packageopt-,$(OPA_PACKAGES))
199 @printf "Installation to $(STDLIB_NODE_DIR) done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
200
201 install-all-packages: $(addprefix install-package-,$(OPA_PACKAGES))
662e95ef » BourgerieQuentin
2012-05-28 [enhance] compiler, packages: Allows to have several backends (separa…
202 @printf "Installation to $(STDLIB_FLAT_DIR) done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
203
2f550855 » OpaOnWindowsNow
2011-10-21 [fix] Makefile: install plugins
204 install-pluginopt-%:
2fae9ee3 » Aqua-Ye
2012-07-12 [fix] Makefile: plugins were not install because of wrong path
205 $(if $(wildcard $(BUILD_DIR)/$(PLUGINS_DIR)/$*.opp/),$(install-plugin))
2f550855 » OpaOnWindowsNow
2011-10-21 [fix] Makefile: install plugins
206
207 install-plugin-%:
208 $(install-plugin)
209
210 install-plugins: $(addprefix install-pluginopt-,$(OPA_PLUGINS))
211 @printf "Installation to $(STDLIB_DIR) done.\n"
212
213 install-all-plugins: $(addprefix install-plugin-,$(OPA_PLUGINS))
214 @printf "Installation to $(STDLIB_DIR) done.\n"
215
216
217
fcef2313 » cedricss
2012-06-11 [enhance] Compile: Makefile improved for opa tools. Built them before…
218 install-bin:
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
219 @printf "Installing into $(INSTALL_DIR)/bin\r"
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
220 @mkdir -p $(INSTALL_DIR)/bin
221 @$(if $(wildcard $(BUILD_DIR)/bin/*),$(INSTALL) -r $(BUILD_DIR)/bin/* $(INSTALL_DIR)/bin)
78a50276 » Aqua-Ye
2012-07-06 [enhance] install: moving some indstall scripts to appropriate direct…
222 @tools/utils/install.sh --quiet --dir $(INSTALL_DIR) --ocamllib $(OCAMLLIB) --ocamlopt $(OCAMLOPT)
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
223 @printf "Installation to $(INSTALL_DIR)/bin done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
224
225 install-lib:
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
226 @printf "Installing into $(INSTALL_DIR)/lib/opa\r"
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
227 @mkdir -p $(INSTALL_DIR)/lib/opa
228 @$(if $(wildcard $(BUILD_DIR)/lib/opa/*),$(INSTALL) -r $(BUILD_DIR)/lib/opa/* $(INSTALL_DIR)/lib/opa/)
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
229 @printf "Installation to $(INSTALL_DIR)/lib/opa done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
230
231 install-share:
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
232 @printf "Installing into $(INSTALL_DIR)/share/opa\r"
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
233 @mkdir -p $(INSTALL_DIR)/share/opa
234 @$(if $(wildcard $(BUILD_DIR)/share/opa/*),$(INSTALL) -r $(BUILD_DIR)/share/opa/* $(INSTALL_DIR)/share/opa/)
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
235 @printf "Installation to $(INSTALL_DIR)/share/opa done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
236
8c3019bb » Mathieu Baudet
2012-01-05 [enhance] manpages: added target install-man to install manpages by d…
237 install-man:
238 @printf "Installing into $(INSTALL_DIR)/share/man\r"
239 @if [ -d $(BUILD_DIR)/man/man1 ]; then \
240 mkdir -p $(INSTALL_DIR)/share/man/man1; \
241 $(INSTALL) -r $(BUILD_DIR)/man/man1/*.1 $(INSTALL_DIR)/share/man/man1; \
242 fi
243 @printf "Installation to $(INSTALL_DIR)/share/man done.\n"
244
4a6014e6 » BourgerieQuentin
2012-06-18 [enhance] build: install the both set of packages
245 install: install-bin install-lib install-share install-plugins install-packages install-node-packages install-man
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
246 @printf "Installation into $(INSTALL_DIR) done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
247
465b5518 » Aqua-Ye
2012-06-25 [enhance] build: added option to not install ocaml
248 install-node: install-bin install-lib install-share install-plugins install-node-packages install-man
249 @printf "Installation into $(INSTALL_DIR) done.\n"
250
fccc6851 » MLstate
2011-06-21 Initial open-source release
251 .PHONY: uninstall
252 uninstall:
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
253 rm -rf $(INSTALL_DIR)/lib/opa
254 @[ ! -d $(INSTALL_DIR)/lib ] || [ -n "`ls -A $(INSTALL_DIR)/lib`" ] || rmdir $(INSTALL_DIR)/lib
255 rm -rf $(INSTALL_DIR)/share/opa
256 rm -rf $(INSTALL_DIR)/share/doc/opa
a9fdc170 » Aqua-Ye
2012-07-06 [doc] Makefile: added a TODO
257 # TODO: remove all installed opa manpages
258 # rm -rf $(INSTALL_DIR)/share/man/man1/opa*
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
259 @[ ! -d $(INSTALL_DIR)/share ] || [ -n "`ls -A $(INSTALL_DIR)/share`" ] || rmdir $(INSTALL_DIR)/share
1b2772b4 » Louis Gesbert
2011-07-08 [fix] Makefile: zealous uninstall
260 $(foreach file,$(wildcard $(BUILD_DIR)/bin/*),rm -f $(INSTALL_DIR)/bin/$(notdir $(file));)
78a50276 » Aqua-Ye
2012-07-06 [enhance] install: moving some indstall scripts to appropriate direct…
261 @tools/utils/install.sh --uninstall --dir $(INSTALL_DIR)
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
262 @[ ! -d $(INSTALL_DIR)/bin ] || [ -n "`ls -A $(INSTALL_DIR)/bin`" ] || rmdir $(INSTALL_DIR)/bin
8037018e » Louis Gesbert
2011-06-23 [fix] Makefiles: using a more portable printf instead of echo
263 @printf "Uninstall done.\n"
fccc6851 » MLstate
2011-06-21 Initial open-source release
264
265 # Install our ocamlbuild-generation engine
266 install-bld:
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
267 @mkdir -p $(INSTALL_DIR)/bin
22b433a3 » Frédéric Perrin
2011-08-29 Don't assume that bash is in /bin
268 @echo "#!/usr/bin/env bash" > $(INSTALL_DIR)/bin/bld
269 @echo "set -e" >> $(INSTALL_DIR)/bin/bld
270 @echo "set -u" >> $(INSTALL_DIR)/bin/bld
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
271 @chmod 755 $(INSTALL_DIR)/bin/bld
272 @echo "BLDDIR=$(PREFIX)/share/opa/bld $(PREFIX)/share/opa/bld/gen_myocamlbuild.sh" >> $(INSTALL_DIR)/bin/bld
538524f9 » Aqua-Ye
2012-07-10 [enhance] ocamlbuild: ability to set OCAMLBUILD_OPT
273 @echo "_build/myocamlbuild -no-plugin $(OCAMLBUILD_OPT) \"\$$@\"" >> $(INSTALL_DIR)/bin/bld
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
274 @mkdir -p $(INSTALL_DIR)/share/opa/bld
6790c3f9 » Aqua-Ye
2012-07-10 [fix] Makefile: fix path for gen_myocamlbuild*.sh
275 @$(INSTALL) tools/build/gen_myocamlbuild.sh tools/build/myocamlbuild_*fix.ml $(CONFIG_PATH)/config.sh $(CONFIG_PATH)/config.mli $(CONFIG_PATH)/config.ml\
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
276 $(INSTALL_DIR)/share/opa/bld
fccc6851 » MLstate
2011-06-21 Initial open-source release
277
278 # Install an opa wrapper with different stdlib and options (for some backwards-compatibility)
279 install-qmlflat: # depends on opabsl_for_compiler, but we don't want to run ocamlbuild twice
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
280 @mkdir -p $(INSTALL_DIR)/bin $(INSTALL_DIR)/share/opa/mlstatebsl
2fae9ee3 » Aqua-Ye
2012-07-12 [fix] Makefile: plugins were not install because of wrong path
281 @$(INSTALL) $(BUILD_DIR)/$(PLUGINS_DIR)/opabsl.opp/lib/plugins/opabsl/mlstatebsl/opabsl_*.opa $(INSTALL_DIR)/share/opa/mlstatebsl
22b433a3 » Frédéric Perrin
2011-08-29 Don't assume that bash is in /bin
282 @echo "#!/usr/bin/env bash" > $(INSTALL_DIR)/bin/qmlflat
283 @echo "set -e" >> $(INSTALL_DIR)/bin/qmlflat
284 @echo "set -u" >> $(INSTALL_DIR)/bin/qmlflat
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
285 @chmod 755 $(INSTALL_DIR)/bin/qmlflat
a1fe4fa4 » BourgerieQuentin
2012-07-18 [fix] qmlflat: Add mlstatebsl to qmlflat
286 @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 $(STDLIB_DIR)/opabsl.opp $$(if ! grep -qE "(^| )--no-stdlib( |$$)" <<<"$$*"; then echo $(INSTALL_DIR)/share/opa/mlstatebsl/*.opa; fi) "$$@"' \
894a7513 » delroth
2011-06-21 Support make DESTDIR=... install for easier packaging
287 >> $(INSTALL_DIR)/bin/qmlflat
fccc6851 » MLstate
2011-06-21 Initial open-source release
288
289 # installs some dev tools on top of the normal install; these should not change often
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
290 install-all: install install-bld install-qmlflat tools/maxmem
33e65507 » Aqua-Ye
2012-07-12 [fix] Makefile: fix install-all and install-qmlflat rules
291 @$(INSTALL) tools/platform_helper.sh $(INSTALL_DIR)/bin/
d863cc77 » Aqua-Ye
2012-07-02 [enhance] all: wip compilation
292 @$(INSTALL) tools/maxmem $(INSTALL_DIR)/bin/
293 @rm tools/maxmem
294 @$(INSTALL) tools/plotmem $(INSTALL_DIR)/bin/
fccc6851 » MLstate
2011-06-21 Initial open-source release
295
296 ##
297 ## DOCUMENTATION
298 ##
299 # (in this section, multiple calls to ocamlbuild are tolerated)
300
301 .PHONY: doc.jsbsl
302 doc.jsbsl: $(MYOCAMLBUILD)
303 $(OCAMLBUILD) $@/index.html
304
305 # this rules provides the doc.html target (from Makefile.bld)
306 # the sed are just there to help sorting by filename-within-directory
307 .PHONY: doc.odocl
308 doc.odocl:
309 echo $(foreach lib,$(ALL_LIBS),$(lib-cmi-$(lib):%.cmi=%)) \
310 | sed 's# \+#\n#g' \
311 | sed 's#\(.*\)/\([^/]*\)#\1 \2#' \
312 | sort -k 2 -u \
313 | sed 's#\(.*\) \([^ ]*\)#\1/\2#' \
314 >$@
315
316 .PHONY: packages-api
317 packages-api: $(MYOCAMLBUILD)
42668dc5 » Aqua-Ye
2012-07-18 [enhance] Makefile: packages-api only constructs node API
318 OPAOPT="$(OPAOPT) --api --parser classic" $(OCAMLBUILD) opa-node-packages.stamp
Something went wrong with that request. Please try again.