Permalink
Browse files

[enhance] ocamlbuild: ability to set OCAMLBUILD_OPT

  • Loading branch information...
1 parent dc1c0f7 commit 538524f95bfd1f7b55143b229b633ea03a6a2b0f @Aqua-Ye Aqua-Ye committed Jul 10, 2012
Showing with 5 additions and 527 deletions.
  1. +3 −1 Makefile
  2. +2 −1 tools/build/Makefile.bld
  3. +0 −525 tools/build/bld.sh
View
@@ -234,6 +234,8 @@ uninstall:
@[ ! -d $(INSTALL_DIR)/bin ] || [ -n "`ls -A $(INSTALL_DIR)/bin`" ] || rmdir $(INSTALL_DIR)/bin
@printf "Uninstall done.\n"
+OCAMLBUILD_OPT ?= -j 6
+
# Install our ocamlbuild-generation engine
install-bld:
@mkdir -p $(INSTALL_DIR)/bin
@@ -242,7 +244,7 @@ install-bld:
@echo "set -u" >> $(INSTALL_DIR)/bin/bld
@chmod 755 $(INSTALL_DIR)/bin/bld
@echo "BLDDIR=$(PREFIX)/share/opa/bld $(PREFIX)/share/opa/bld/gen_myocamlbuild.sh" >> $(INSTALL_DIR)/bin/bld
- @echo "_build/myocamlbuild -no-plugin -j 6 \"\$$@\"" >> $(INSTALL_DIR)/bin/bld
+ @echo "_build/myocamlbuild -no-plugin $(OCAMLBUILD_OPT) \"\$$@\"" >> $(INSTALL_DIR)/bin/bld
@mkdir -p $(INSTALL_DIR)/share/opa/bld
@$(INSTALL) build/gen_myocamlbuild.sh build/myocamlbuild_*fix.ml config.sh config.mli config.ml\
$(INSTALL_DIR)/share/opa/bld
View
@@ -38,7 +38,8 @@
BUILD_DIR ?= _build
BLDDIR ?= tools/build
MYOCAMLBUILD = $(BUILD_DIR)/myocamlbuild
-OCAMLBUILD = $(MYOCAMLBUILD) -no-plugin -j 6 $(OCAMLBUILD_FLAGS)
+OCAMLBUILD_OPT ?= -j 6
+OCAMLBUILD = $(MYOCAMLBUILD) -no-plugin $(OCAMLBUILD_OPT) $(OCAMLBUILD_FLAGS)
INSTALL ?= cp -u
Oops, something went wrong.

0 comments on commit 538524f

Please sign in to comment.