Commit a5de7014 authored by POTTIER Francois's avatar POTTIER Francois

New entry [make sdk] in [src/Makefile].

parent 47b84aad
.PHONY: everyday bootstrap stage1 stage2 stage3 clean
.PHONY: everyday bootstrap stage1 stage2 stage3 sdk clean
# ----------------------------------------------------------------------------
# Choose a target.
......@@ -84,8 +84,26 @@ stage3:
done; \
echo "Bootstrap successful."
# -------------------------------------------------------------------------
# The ocamlbuild targets that should be used to build menhirSdk.
MENHIRSDK := menhirSdk.cmo
ifneq ($(TARGET),byte)
MENHIRSDK := $(MENHIRSDK) menhirSdk.cmx
endif
# ----------------------------------------------------------------------------
# Building menhirSdk.
sdk:
@ $(OCAMLBUILD) \
-build-dir _sdk \
-tag sdk \
$(MENHIRSDK)
# ----------------------------------------------------------------------------
# Cleaning up.
clean::
rm -rf .versioncheck _stage1 _stage2 _stage3
rm -rf .versioncheck _stage1 _stage2 _stage3 _sdk
# This is the list of modules that must go into MenhirSdk.
Keyword
Positions
Stretch
IL
IO
Version
Cmly_format
Cmly_api
Cmly_read
......@@ -270,6 +270,18 @@ let parser_configuration () =
(* ---------------------------------------------------------------------------- *)
(* If the tag [sdk] is provided, then the modules listed in [menhirSdk.mlpack]
must be built using [for-pack(MenhirSdk)]. Otherwise, we are building Menhir
and menhirLib, so the modules listed in [menhirLib.mlpack] must be built using
[for-pack(MenhirLib)]. There could be a nonempty intersection between the two,
which is why we do not supply both sets of flags at once. *)
let sdk () : bool =
mark_tag_used "sdk";
Tags.mem "sdk" (tags_of_pathname "")
(* ---------------------------------------------------------------------------- *)
(* Compilation flags for Menhir. *)
let flags () =
......@@ -287,6 +299,6 @@ let () =
(* Add our rules after the standard ones. *)
parser_configuration();
flags();
for_pack "menhirLib";
if sdk() then for_pack "menhirSdk" else for_pack "menhirLib"
| _ -> ()
)
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