Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
e10ffbbd
Commit
e10ffbbd
authored
Sep 13, 2018
by
Yann REGIS-GIANAS
Committed by
POTTIER Francois
Sep 13, 2018
Browse files
Make MenhirLib and MenhirSdk both install their .cmxs files.
parent
d7886203
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
e10ffbbd
...
...
@@ -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
# ----------------------------------------------------------------------------
...
...
quicktest/build.sh
View file @
e10ffbbd
...
...
@@ -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
src/Makefile
View file @
e10ffbbd
.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
# ----------------------------------------------------------------------------
...
...
src/menhirLib.META
View file @
e10ffbbd
...
...
@@ -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"
src/menhirSdk.META
View file @
e10ffbbd
...
...
@@ -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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment