Skip to content
Snippets Groups Projects
Commit c6be844b authored by Andre Maroneze's avatar Andre Maroneze Committed by David Bühler
Browse files

[dev] use DUNE_WS variable for compiling/installing dune-workspaces

parent ac08b11b
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,12 @@ FRAMAC_LINTCK_SRC:=tools/lint ...@@ -43,6 +43,12 @@ FRAMAC_LINTCK_SRC:=tools/lint
.PHONY: all .PHONY: all
ifneq (${DUNE_WS},)
WORKSPACE_OPT:=--workspace dev/dune-workspace.${DUNE_WS}
else
WORKSPACE_OPT:=
endif
all:: all::
ifeq (${FRAMAC_DEVELOPER},yes) ifeq (${FRAMAC_DEVELOPER},yes)
dune build --no-print-directory --root ${FRAMAC_LINTCK_SRC} dune build --no-print-directory --root ${FRAMAC_LINTCK_SRC}
...@@ -53,7 +59,7 @@ ifneq ($(DISABLED_PLUGINS),) ...@@ -53,7 +59,7 @@ ifneq ($(DISABLED_PLUGINS),)
rm -rf _build .merlin rm -rf _build .merlin
./dev/disable-plugins.sh ${DISABLED_PLUGINS} ./dev/disable-plugins.sh ${DISABLED_PLUGINS}
endif endif
dune build $(DUNE_BUILD_OPTS) @install dune build ${WORKSPACE_OPT} ${DUNE_BUILD_OPTS} @install
clean:: purge-tests # to be done before a "dune" command clean:: purge-tests # to be done before a "dune" command
ifeq (${FRAMAC_DEVELOPER},yes) ifeq (${FRAMAC_DEVELOPER},yes)
......
...@@ -52,6 +52,12 @@ endif ...@@ -52,6 +52,12 @@ endif
.PHONY: install uninstall .PHONY: install uninstall
ifneq (${DUNE_WS},)
WORKSPACE_OPT:=--workspace dev/dune-workspace.${DUNE_WS}
else
WORKSPACE_OPT:=
endif
ifneq ($(INSTALL_TARGET),) ifneq ($(INSTALL_TARGET),)
INSTALL_TARGET:="$(INSTALL_TARGET) " INSTALL_TARGET:="$(INSTALL_TARGET) "
endif endif
...@@ -68,12 +74,12 @@ endif ...@@ -68,12 +74,12 @@ endif
ifeq ($(PREFIX),$(OPAM_SWITCH_PREFIX)) ifeq ($(PREFIX),$(OPAM_SWITCH_PREFIX))
@echo "Installing $(INSTALL_TARGET)to current Opam switch" @echo "Installing $(INSTALL_TARGET)to current Opam switch"
@printf " Copying and relocating files..." @printf " Copying and relocating files..."
dune install --root . ${MANDIR_OPT} 2> /dev/null dune install ${WORKSPACE_OPT} --root . ${MANDIR_OPT} 2> /dev/null
@echo " (done)" @echo " (done)"
else else
@echo "Installing $(INSTALL_TARGET)to ${PREFIX}" @echo "Installing $(INSTALL_TARGET)to ${PREFIX}"
@printf " Copying and relocating files..." @printf " Copying and relocating files..."
dune install --root . --prefix ${PREFIX} ${MANDIR_OPT} 2> /dev/null dune install ${WORKSPACE_OPT} --root . --prefix ${PREFIX} ${MANDIR_OPT} 2> /dev/null
@echo " (done)" @echo " (done)"
@echo 'DO NOT FORGET TO EXPAND YOUR OCAMLPATH VARIABLE:' @echo 'DO NOT FORGET TO EXPAND YOUR OCAMLPATH VARIABLE:'
@echo ' export OCAMLPATH="${PREFIX}/lib:$$OCAMLPATH"' @echo ' export OCAMLPATH="${PREFIX}/lib:$$OCAMLPATH"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment