Commit e10ffbbd authored by Yann REGIS-GIANAS's avatar Yann REGIS-GIANAS Committed by POTTIER Francois

Make MenhirLib and MenhirSdk both install their .cmxs files.

parent d7886203
......@@ -168,7 +168,7 @@ all:
MENHIRLIB := menhirLib.mli menhirLib.ml menhirLib.cmi menhirLib.cmo
ifneq ($(TARGET),byte)
MENHIRLIB := $(MENHIRLIB) menhirLib.cmx menhirLib.$(OBJ)
MENHIRLIB := $(MENHIRLIB) menhirLib.cmx menhirLib.cmxs menhirLib.$(OBJ)
endif
# -------------------------------------------------------------------------
......@@ -177,7 +177,7 @@ endif
MENHIRSDK := menhirSdk.cmi menhirSdk.cmo
ifneq ($(TARGET),byte)
MENHIRSDK := $(MENHIRSDK) menhirSdk.cmx menhirSdk.$(OBJ)
MENHIRSDK := $(MENHIRSDK) menhirSdk.cmx menhirSdk.cmxs menhirSdk.$(OBJ)
endif
# ----------------------------------------------------------------------------
......
......@@ -28,7 +28,7 @@ cp -f $SRC/menhirLib.META $SRC/META
trap "{ rm -f $SRC/META ; }" EXIT
if ! ocamlfind install menhirLib \
$SRC/META $BUILD/menhirLib.cmi $BUILD/menhirLib.cmo \
$BUILD/menhirLib.cmx $BUILD/menhirLib.o ; then
$BUILD/menhirLib.cmx $BUILD/menhirLib.cmxs $BUILD/menhirLib.o ; then
echo "Could not install MenhirLib. Stop."
exit 1
fi
......@@ -36,7 +36,7 @@ echo "Installing new MenhirSdk..."
cp -f $SRC/menhirSdk.META $SRC/META
if ! ocamlfind install menhirSdk \
$SRC/META $SDKDIR/menhirSdk.cmi $SDKDIR/menhirSdk.cmo \
$SDKDIR/menhirSdk.cmx $SDKDIR/menhirSdk.o; then
$SDKDIR/menhirSdk.cmx $SDKDIR/menhirSdk.cmxs $SDKDIR/menhirSdk.o; then
echo "Could not install MenhirSdk. Stop."
exit 1
fi
.PHONY: everyday bootstrap stage1 stage2 stage3 sdk clean
# ----------------------------------------------------------------------------
# Choose a target.
......@@ -51,10 +51,15 @@ SRC := ..
FLAGS := -v -lg 1 -la 1 -lc 1 --table --infer --stdlib $(SRC) --strict --fixed-exception --canonical
# Build .cmxs in case of native compilation.
ifneq ($(TARGET),byte)
MENHIRLIBCMXS := menhirLib.cmxs
endif
stage2:
@ $(OCAMLBUILD) -build-dir _stage2 -tag fancy_parser \
-use-menhir -menhir "$(SRC)/_stage1/menhir.$(TARGET) $(FLAGS)" \
menhir.$(TARGET)
$(MENHIRLIBCMXS) menhir.$(TARGET)
# ----------------------------------------------------------------------------
# Stage 3 (optional).
......@@ -77,7 +82,7 @@ stage3:
MENHIRSDK := menhirSdk.cmo
ifneq ($(TARGET),byte)
MENHIRSDK := $(MENHIRSDK) menhirSdk.cmx
MENHIRSDK := $(MENHIRSDK) menhirSdk.cmx menhirSdk.cmxs
endif
# ----------------------------------------------------------------------------
......
......@@ -2,3 +2,4 @@ requires = ""
description = "Runtime support for code generated by Menhir"
archive(byte) = "menhirLib.cmo"
archive(native) = "menhirLib.cmx"
plugin(native) = "menhirLib.cmxs"
......@@ -2,3 +2,4 @@ requires = ""
description = "Toolkit for postprocessing Menhir automata (.cmly files)"
archive(byte) = "menhirSdk.cmo"
archive(native) = "menhirSdk.cmx"
plugin(native) = "menhirSdk.cmxs"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment