aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-05-11 15:11:07 +0000
committerGravatar aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-05-11 15:11:07 +0000
commit5ea279dbd47d9ef1b87351e4df469aba3310f3f0 (patch)
treec14542a358247563989a3d887a94f5a6d81782cc
parent2abc6e4c9b35570a44af9a246c88bb177d81373d (diff)
Tentative and very experminental support for typerex. Enabled with
./configure -typerex . It causes (non-fatal) errors when compiling files without a .mli (the problem seems to have something to do with the flag -intf-suffix .cmi). In practice, most typerex functionalities don't work well because typerex fails its lookup into files compiled with -rectypes. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15302 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--.typerex18
-rw-r--r--Makefile.build4
-rw-r--r--config/Makefile.template1
-rwxr-xr-xconfigure6
4 files changed, 27 insertions, 2 deletions
diff --git a/.typerex b/.typerex
new file mode 100644
index 000000000..9ccd4e7ef
--- /dev/null
+++ b/.typerex
@@ -0,0 +1,18 @@
+parsing
+ide
+ide/utils
+interp
+kernel
+kernel/byterun
+lib
+library
+plugins
+pretyping
+proofs
+scripts
+states
+tactics
+theories
+tools
+tools/coqdoc
+toplevel \ No newline at end of file
diff --git a/Makefile.build b/Makefile.build
index 5b490148d..e4e4024b7 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -83,8 +83,8 @@ HIDE := $(if $(VERBOSE),,@)
LOCALINCLUDES=$(addprefix -I , $(SRCDIRS) )
MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP4LIB)
-OCAMLC += $(CAMLFLAGS)
-OCAMLOPT += $(CAMLFLAGS)
+OCAMLC := $(TYPEREX) $(OCAMLC) $(CAMLFLAGS)
+OCAMLOPT := $(TYPEREX) $(OCAMLOPT) $(CAMLFLAGS)
BYTEFLAGS=$(MLINCLUDES) $(CAMLDEBUG) $(USERFLAGS)
OPTFLAGS=$(MLINCLUDES) $(CAMLDEBUGOPT) $(CAMLTIMEPROF) $(USERFLAGS)
diff --git a/config/Makefile.template b/config/Makefile.template
index 91b12cb4f..f406ab6fb 100644
--- a/config/Makefile.template
+++ b/config/Makefile.template
@@ -83,6 +83,7 @@ CAMLMKTOP="CAMLMKTOPEXEC"
# Caml flags
CAMLFLAGS=-rectypes CAMLANNOTATEFLAG
+TYPEREX=TYPEREXCMD
# Compilation debug flags
CAMLDEBUG=COQDEBUGFLAG
diff --git a/configure b/configure
index bd6a85afc..e98f8c7dd 100755
--- a/configure
+++ b/configure
@@ -93,6 +93,8 @@ usage () {
printf "\tAdd profiling information in the Coq executables\n"
echo "-annotate"
printf "\tCompiles Coq with -dtypes option\n"
+ echo "-typerex"
+ printf "\tCompiles Coq using typerex wrapper\n"
echo "-makecmd <command>"
printf "\tName of GNU Make command.\n"
}
@@ -109,12 +111,14 @@ ocamllexexec=ocamllex
ocamlyaccexec=ocamlyacc
ocamlmktopexec=ocamlmktop
camlp4oexec=camlp4o
+default_typerex_wrapper="ocp-wrapper -save-types"
coq_debug_flag=
coq_debug_flag_opt=
coq_profile_flag=
coq_annotate_flag=
+coq_typerex_wrapper=
best_compiler=opt
cflags="-fno-defer-pop -Wall -Wno-unused"
natdynlink=yes
@@ -272,6 +276,7 @@ while : ; do
-debug|--debug) coq_debug_flag=-g;;
-profile|--profile) coq_profile_flag=-p;;
-annotate|--annotate) coq_annotate_flag=-dtypes;;
+ -typerex|--typerex) coq_typerex_wrapper=$default_typerex_wrapper;;
-force-caml-version|--force-caml-version|-force-ocaml-version|--force-ocaml-version)
force_caml_version_spec=yes
force_caml_version=yes;;
@@ -1157,6 +1162,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \
-e "s|COQDEBUGFLAG|$coq_debug_flag|" \
-e "s|COQPROFILEFLAG|$coq_profile_flag|" \
-e "s|CAMLANNOTATEFLAG|$coq_annotate_flag|" \
+ -e "s|TYPEREXCMD|$coq_typerex_wrapper|" \
-e "s|CCOMPILEFLAGS|$cflags|" \
-e "s|BESTCOMPILER|$best_compiler|" \
-e "s|DLLEXTENSION|$DLLEXT|" \