Define BYTERUN as a real make variable

This variable is used to give a value to standard_runtime in
utils/config.ml.

Before this commit, its values were hard-coded in Makefile and
Makefile.nt, in the rules generating utils/config.ml from utils/config.mlp.

This commit gets rid of this hardcoding, to prepare the sharing of the
rules mentionned above.
master
Sébastien Hinderer 2016-12-21 10:01:11 +01:00
parent 02e2cf2c6c
commit 04aa870b9b
7 changed files with 17 additions and 2 deletions

View File

@ -400,7 +400,7 @@ otherlibs/dynlink/dynlink.cmxa: otherlibs/dynlink/natdynlink.ml
utils/config.ml: utils/config.mlp config/Makefile
@rm -f utils/config.ml
sed -e 's|%%LIBDIR%%|$(LIBDIR)|' \
-e 's|%%BYTERUN%%|$(BINDIR)/ocamlrun|' \
-e 's|%%BYTERUN%%|$(BYTERUN)|' \
-e 's|%%CCOMPTYPE%%|cc|' \
-e 's|%%BYTECC%%|$(BYTECC) $(SHAREDCCCOMPOPTS)|' \
-e 's|%%NATIVECC%%|$(NATIVECC)|' \

View File

@ -387,7 +387,7 @@ otherlibs/dynlink/dynlink.cmxa: otherlibs/dynlink/natdynlink.ml
utils/config.ml: utils/config.mlp config/Makefile
@rm -f utils/config.ml
sed -e "s|%%LIBDIR%%|$(LIBDIR)|" \
-e "s|%%BYTERUN%%|ocamlrun|" \
-e "s|%%BYTERUN%%|$(BYTERUN)|" \
-e 's|%%CCOMPTYPE%%|$(CCOMPTYPE)|' \
-e "s|%%BYTECC%%|$(BYTECC)|" \
-e "s|%%NATIVECC%%|$(NATIVECC)|" \

View File

@ -28,6 +28,9 @@ WITH_OCAMLDOC=ocamldoc
### Where to install the binaries
BINDIR=$(PREFIX)/bin
### Standard runtime system
BYTERUN=ocamlrun
### Where to install the standard library
LIBDIR=$(PREFIX)/lib

View File

@ -28,6 +28,9 @@ WITH_OCAMLDOC=ocamldoc
### Where to install the binaries
BINDIR=$(PREFIX)/bin
### Standard runtime system
BYTERUN=ocamlrun
### Where to install the standard library
LIBDIR=$(PREFIX)/lib

View File

@ -22,6 +22,9 @@ PREFIX=C:/ocamlms
### Where to install the binaries.
BINDIR=$(PREFIX)/bin
### Standard runtime system
BYTERUN=ocamlrun
### Where to install the standard library
LIBDIR=$(PREFIX)/lib

View File

@ -22,6 +22,9 @@ PREFIX=C:/ocamlms64
### Where to install the binaries.
BINDIR=$(PREFIX)/bin
### Standard runtime system
BYTERUN=ocamlrun
### Where to install the standard library
LIBDIR=$(PREFIX)/lib

3
configure vendored
View File

@ -262,6 +262,9 @@ case "$bindir" in
bindir="$prefix/bin";;
*) echo "BINDIR=$bindir" >> Makefile;;
esac
echo 'BYTERUN=$(BINDIR)/ocamlrun' >> Makefile
case "$libdir" in
"") echo 'LIBDIR=$(PREFIX)/lib/ocaml' >> Makefile
libdir="$prefix/lib/ocaml";;