aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2018-03-09 13:09:16 +0100
committerGravatar Maxime Dénès <mail@maximedenes.fr>2018-03-09 13:09:16 +0100
commit0c345d64d67c01c7b7a75bf23391b421f95c4fb7 (patch)
treef86b9a5c1093dfe66f744c86f8ed8ab6bae993d6
parent16f93d201cf7e379d5acf533be20fed30bbc212c (diff)
parent17f9e85d9785b2ab77426e6d8644840fa7f37d85 (diff)
Merge PR #6871: [build] Simpler byte/opt toplevel build.
-rw-r--r--Makefile.build26
-rw-r--r--toplevel/coqtop_bin.ml2
-rw-r--r--toplevel/coqtop_byte_bin.ml15
-rw-r--r--toplevel/coqtop_opt_bin.ml15
4 files changed, 38 insertions, 20 deletions
diff --git a/Makefile.build b/Makefile.build
index f583c3337..ffe605757 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -386,21 +386,16 @@ coqbinaries: $(COQTOPEXE) $(CHICKEN) $(CSDPCERT) $(FAKEIDE)
coqbyte: $(COQTOPBYTE) $(CHICKENBYTE)
-COQTOP_OPT_MLTOP=toplevel/coqtop_opt_bin.cmx
-COQTOP_BYTE_MLTOP=toplevel/coqtop_byte_bin.cmo
-
-$(COQTOP_BYTE_MLTOP): toplevel/coqtop_byte_bin.ml
- $(SHOW)'OCAMLC $<'
- $(HIDE)$(OCAMLC) $(MLINCLUDES) $(BYTEFLAGS) -package compiler-libs.toplevel -c $<
+COQTOP_OPT=toplevel/coqtop_opt_bin.ml
+COQTOP_BYTE=toplevel/coqtop_byte_bin.ml
ifeq ($(BEST),opt)
-$(COQTOPEXE): $(LINKCMX) $(LIBCOQRUN) $(TOPLOOPCMA:.cma=.cmxs) $(COQTOP_OPT_MLTOP)
+$(COQTOPEXE): $(LINKCMX) $(LIBCOQRUN) $(TOPLOOPCMA:.cma=.cmxs) $(COQTOP_OPT)
$(SHOW)'COQMKTOP -o $@'
- $(HIDE)$(OCAMLOPT) -linkall -linkpkg -I toplevel \
+ $(HIDE)$(OCAMLOPT) -linkall -linkpkg -I vernac -I toplevel \
-I kernel/byterun/ -cclib -lcoqrun \
- $(SYSMOD) -package camlp5.gramlib \
- $(LINKCMX) $(OPTFLAGS) $(LINKMETADATA) \
- $(COQTOP_OPT_MLTOP) toplevel/coqtop_bin.ml -o $@
+ $(SYSMOD) -package camlp5.gramlib \
+ $(LINKCMX) $(OPTFLAGS) $(LINKMETADATA) $(COQTOP_OPT) -o $@
$(STRIP) $@
$(CODESIGN) $@
else
@@ -409,13 +404,12 @@ $(COQTOPEXE): $(COQTOPBYTE)
endif
# VMBYTEFLAGS will either contain -custom of the right -dllpath for the VM
-$(COQTOPBYTE): $(LINKCMO) $(LIBCOQRUN) $(TOPLOOPCMA) $(COQTOP_BYTE_MLTOP)
+$(COQTOPBYTE): $(LINKCMO) $(LIBCOQRUN) $(TOPLOOPCMA) $(COQTOP_BYTE)
$(SHOW)'COQMKTOP -o $@'
- $(HIDE)$(OCAMLC) -linkall -linkpkg -I toplevel \
+ $(HIDE)$(OCAMLC) -linkall -linkpkg -I lib -I vernac -I toplevel \
-I kernel/byterun/ -cclib -lcoqrun $(VMBYTEFLAGS) \
- $(SYSMOD) -package camlp5.gramlib,compiler-libs.toplevel \
- $(LINKCMO) $(BYTEFLAGS) \
- $(COQTOP_BYTE_MLTOP) toplevel/coqtop_bin.ml -o $@
+ $(SYSMOD) -package camlp5.gramlib,compiler-libs.toplevel \
+ $(LINKCMO) $(BYTEFLAGS) $(COQTOP_BYTE) -o $@
# For coqc
COQCCMO:=clib/clib.cma lib/lib.cma toplevel/usage.cmo tools/coqc.cmo
diff --git a/toplevel/coqtop_bin.ml b/toplevel/coqtop_bin.ml
deleted file mode 100644
index 56aced92a..000000000
--- a/toplevel/coqtop_bin.ml
+++ /dev/null
@@ -1,2 +0,0 @@
-(* Main coqtop initialization *)
-let () = Coqtop.start()
diff --git a/toplevel/coqtop_byte_bin.ml b/toplevel/coqtop_byte_bin.ml
index 7d8354ec3..0b65cebbb 100644
--- a/toplevel/coqtop_byte_bin.ml
+++ b/toplevel/coqtop_byte_bin.ml
@@ -1,3 +1,13 @@
+(************************************************************************)
+(* * The Coq Proof Assistant / The Coq Development Team *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
+(* <O___,, * (see CREDITS file for the list of authors) *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(* * (see LICENSE file for the text of the license) *)
+(************************************************************************)
+
let drop_setup () =
begin try
(* Enable rectypes in the toplevel if it has the directive #rectypes *)
@@ -18,4 +28,7 @@ let drop_setup () =
ml_loop = (fun () -> Toploop.loop ppf);
})
-let _ = drop_setup ()
+(* Main coqtop initialization *)
+let _ =
+ drop_setup ();
+ Coqtop.start()
diff --git a/toplevel/coqtop_opt_bin.ml b/toplevel/coqtop_opt_bin.ml
index 410b4679a..ea4c0ea52 100644
--- a/toplevel/coqtop_opt_bin.ml
+++ b/toplevel/coqtop_opt_bin.ml
@@ -1,3 +1,16 @@
+(************************************************************************)
+(* * The Coq Proof Assistant / The Coq Development Team *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
+(* <O___,, * (see CREDITS file for the list of authors) *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(* * (see LICENSE file for the text of the license) *)
+(************************************************************************)
+
let drop_setup () = Mltop.remove ()
-let _ = drop_setup ()
+(* Main coqtop initialization *)
+let _ =
+ drop_setup ();
+ Coqtop.start()