Skip to content
Browse files

[cleanup] Makefile, Makefile.bld: some cleanup, and factorize OCAMLBU…

…ILD_OPT
  • Loading branch information...
1 parent 1275b5e commit 6a0b86b58c5bdcf34db4bf9fb39b15372f641c3e @Aqua-Ye Aqua-Ye committed Jul 12, 2012
Showing with 17 additions and 10 deletions.
  1. +17 −9 Makefile
  2. +0 −1 tools/build/Makefile.bld
View
26 Makefile
@@ -15,6 +15,7 @@ CONFIG_PATH = tools/build
include $(CONFIG_PATH)/config.make
MAKE ?= $_
+OCAMLBUILD_OPT ?= -j 6
ifndef NO_REBUILD_OPA_PACKAGES
OPAOPT += "--rebuild"
@@ -78,6 +79,10 @@ distrib: $(MYOCAMLBUILD)
@$(call copy-tools,$(DISTRIB_TOOLS))
$(MAKE) $(OPA_TOOLS)
+##
+## MANPAGES
+##
+
.PHONY: manpages
manpages: $(MYOCAMLBUILD)
ifndef NO_MANPAGES
@@ -86,17 +91,22 @@ else
@echo "Not building manpages"
endif
+##
+## OPA-CREATE
+##
+
+target-tool-opa-create = tools/opa-create/src/opa-create.exe
+
.PHONY: opa-create
opa-create: $(MYOCAMLBUILD)
- $(OCAMLBUILD) tools/opa-create/src/opa-create.exe
- @$(copy-tool-opa-create)
+ $(OCAMLBUILD) $(target-tool-opa-create)
+ @mkdir -p $(BUILD_DIR)/bin
+ $(INSTALL) $(BUILD_DIR)/$(target-tool-opa-create) $(BUILD_DIR)/bin/opa-create
+
.PHONY: install-opa-create
install-opa-create:
- @$(install-opa-create)
-target-tool-opa-create = tools/opa-create/src/opa-create.exe
-copy-tool-opa-create = mkdir -p $(BUILD_DIR)/bin && $(INSTALL) $(BUILD_DIR)/tools/opa-create/src/opa-create.exe $(BUILD_DIR)/bin/opa-create
-install-opa-create = mkdir -p $(PREFIX)/bin && $(INSTALL) $(BUILD_DIR)/bin/opa-create $(INSTALL_DIR)/bin/opa-create
-
+ @mkdir -p $(PREFIX)/bin
+ $(INSTALL) $(BUILD_DIR)/bin/opa-create $(INSTALL_DIR)/bin/opa-create
##
## INSTALLATION
@@ -237,8 +247,6 @@ 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
View
1 tools/build/Makefile.bld
@@ -38,7 +38,6 @@
BUILD_DIR ?= _build
BLDDIR ?= tools/build
MYOCAMLBUILD = $(BUILD_DIR)/myocamlbuild
-OCAMLBUILD_OPT ?= -j 6
OCAMLBUILD = $(MYOCAMLBUILD) -no-plugin $(OCAMLBUILD_OPT) $(OCAMLBUILD_FLAGS)
INSTALL ?= cp -u

0 comments on commit 6a0b86b

Please sign in to comment.
Something went wrong with that request. Please try again.