Skip to content
Snippets Groups Projects
Commit 3a167d94 authored by David Bühler's avatar David Bühler Committed by Allan Blanchard
Browse files

[build] make install: replaces environment variable INSTALLDIR by PREFIX.

This is more coherent with `dune install --prefix` option and other targets
`make install` in doc and ivette Makefiles.
parent 10db0641
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,7 @@ stdenvNoCC.mkDerivation rec { ...@@ -110,7 +110,7 @@ stdenvNoCC.mkDerivation rec {
''; '';
installFlags = [ installFlags = [
"INSTALLDIR=$(out)" "PREFIX=$(out)"
]; ];
# Simpler for our test target # Simpler for our test target
......
...@@ -133,7 +133,7 @@ stdenvNoCC.mkDerivation rec { ...@@ -133,7 +133,7 @@ stdenvNoCC.mkDerivation rec {
''; '';
installFlags = [ installFlags = [
"INSTALLDIR=$(out)" "PREFIX=$(out)"
]; ];
meta = { meta = {
......
...@@ -112,7 +112,7 @@ stdenv.mkDerivation { ...@@ -112,7 +112,7 @@ stdenv.mkDerivation {
''; '';
installFlags = [ installFlags = [
"INSTALLDIR=$(out)" "PREFIX=$(out)"
]; ];
postInstall = if install-opam then '' postInstall = if install-opam then ''
......
...@@ -92,7 +92,7 @@ build: [ ...@@ -92,7 +92,7 @@ build: [
] ]
install: [ install: [
[make "INSTALLDIR=%{prefix}%" "MANDIR=%{mandir}%" "install"] [make "PREFIX=%{prefix}%" "MANDIR=%{mandir}%" "install"]
[make "PREFIX=%{prefix}%" "-C" "doc" "install"] {with-doc} [make "PREFIX=%{prefix}%" "-C" "doc" "install"] {with-doc}
] ]
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
help:: help::
@echo "Installation configuration variables" @echo "Installation configuration variables"
@echo " - INSTALLDIR: used to customize installation path" @echo " - PREFIX: used to customize installation path"
@echo " - MANDIR: used to customize man files installation path" @echo " - MANDIR: used to customize man files installation path"
################################ ################################
...@@ -37,11 +37,11 @@ help:: ...@@ -37,11 +37,11 @@ help::
# Set this variable to request a specific installation directory # Set this variable to request a specific installation directory
# Default: Dune installs in the Opam directory # Default: Dune installs in the Opam directory
INSTALLDIR?= PREFIX?=
# Set this variable to request a specific man installation directory # Set this variable to request a specific man installation directory
# Default: the manuals are installed in the installation directory transmitted # Default: the manuals are installed in the installation directory transmitted
# to Dune (so either in Opam or in INSTALLDIR) # to Dune (so either in Opam or in PREFIX)
MANDIR?= MANDIR?=
ifeq (${MANDIR},) ifeq (${MANDIR},)
...@@ -56,19 +56,19 @@ endif ...@@ -56,19 +56,19 @@ endif
.PHONY: install uninstall .PHONY: install uninstall
install: install:
ifeq ($(INSTALLDIR),) ifeq ($(PREFIX),)
dune install ${MANDIR_OPT} dune install ${MANDIR_OPT}
else else
@echo "Installing to prefix: ${INSTALLDIR}" @echo "Installing to prefix: ${PREFIX}"
dune install --prefix ${INSTALLDIR} ${MANDIR_OPT} dune install --prefix ${PREFIX} ${MANDIR_OPT}
@echo 'DO NOT FORGET TO EXPAND YOUR OCAMLPATH VARIABLE:' @echo 'DO NOT FORGET TO EXPAND YOUR OCAMLPATH VARIABLE:'
@echo ' export OCAMLPATH="${INSTALLDIR}/lib:$$OCAMLPATH"' @echo ' export OCAMLPATH="${PREFIX}/lib:$$OCAMLPATH"'
endif endif
uninstall: uninstall:
ifeq ($(INSTALLDIR),) ifeq ($(PREFIX),)
dune uninstall ${MANDIR_OPT} dune uninstall ${MANDIR_OPT}
else else
@echo "Uninstalling from prefix: ${INSTALLDIR}" @echo "Uninstalling from prefix: ${PREFIX}"
dune uninstall --prefix ${INSTALLDIR} ${MANDIR_OPT} dune uninstall --prefix ${PREFIX} ${MANDIR_OPT}
endif endif
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