LABLGLADECC = @LABLGLADECC@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
DISTRIBUTED = @DISTRIBUTED@
+ANNOT = @ANNOT@
MATITA_REQUIRES = @FINDLIB_REQUIRES@
MATITA_CREQUIRES = @FINDLIB_CREQUIRES@
# $OCAMLFIND must be set to a meaningful vaule, including OCAMLPATH=
+ifeq ($(ANNOT),true)
+ ANNOTOPTION = -dtypes
+else
+ ANNOTOPTION =
+endif
+
PREPROCOPTIONS = -pp camlp5o
SYNTAXOPTIONS = -syntax camlp5o
PREREQ =
-OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread -rectypes
+OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread -rectypes $(ANNOTOPTION)
OCAMLDEBUGOPTIONS = -g
#OCAML_PROF=p -p a
OCAMLARCHIVEOPTIONS =
fi
AC_MSG_RESULT($MSG)
+AC_MSG_CHECKING(--enable-annot argument)
+AC_ARG_ENABLE(annot,
+ [ --enable-annot Turn on -dtypes compilation option],
+ [GIVEN="yes";
+ case "${enableval}" in
+ yes) ANNOT=true;;
+ no) ANNOT=false;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-annot) ;;
+ esac],
+ [GIVEN="no"; ANNOT="false"])
+MSG=$GIVEN
+if test "$ANNOT" = "true"; then
+ MSG="$MSG, type annotation enabled."
+else
+ MSG="$MSG, type annotation disabled."
+fi
+AC_MSG_RESULT($MSG)
+
+
AC_MSG_CHECKING(--with-runtime-dir argument)
AC_ARG_WITH(runtime-dir,
[ --with-runtime-dir Runtime directory (current working directory if not given)],
AC_SUBST(CAMLP5O)
AC_SUBST(DBHOST)
AC_SUBST(DEBUG)
+AC_SUBST(ANNOT)
AC_SUBST(DISTRIBUTED)
AC_SUBST(FINDLIB_CREQUIRES)
AC_SUBST(FINDLIB_REQUIRES)
NULL =
H=@
-OCAML_FLAGS = -pp $(CAMLP5O) -rectypes
+ifeq ($(ANNOT),true)
+ ANNOTOPTION = -dtypes
+else
+ ANNOTOPTION =
+endif
+
+OCAML_FLAGS = -pp $(CAMLP5O) -rectypes $(ANNOTOPTION)
OCAMLDEP_FLAGS = -pp $(CAMLP5O)
PKGS = -package "$(MATITA_REQUIRES)"
CPKGS = -package "$(MATITA_CREQUIRES)"
# objects for matitac (batch compiler)
CML = buildTimeConf.ml $(CMLI:%.mli=%.ml)
MAINCML = $(MAINCMLI:%.mli=%.ml)
-
+
PROGRAMS_BYTE = \
matita matitac matitadep matitaclean \
matitawiki
$(H)cd $(WHERE)/ma/standard-library;(HOME=$(WHERE) USER=builder MATITA_RT_BASE_DIR=$(WHERE) MATITA_FLAGS='$(MATITA_CFLAGS)' $(WHERE)/matitac -system -noinnertypes)
$(H)echo "destroy"
$(H)cd $(WHERE)/ma/standard-library;(HOME=$(WHERE) USER=builder MATITA_RT_BASE_DIR=$(WHERE) MATITA_FLAGS='$(MATITA_CFLAGS)' $(WHERE)/matitaclean)
- # sqlite3 only
+# sqlite3 only
$(H)cp $(WHERE)/.matita/matita.db $(WHERE)/metadata.db || true
- #$(H)rm -rf $(WHERE)/.matita/
+#$(H)rm -rf $(WHERE)/.matita/
touch $@
endif
$(H)cd ..; otags -vi -r components/ matita/
.PHONY: depend
-
+
depend:
$(H)echo " OCAMLDEP"
$(H)$(OCAMLDEP) *.ml *.mli > .depend