LABLGLADECC = @LABLGLADECC@
REQUIRES = @FINDLIB_REQUIRES@
CREQUIRES = @FINDLIB_CREQUIRES@
+DEPREQUIRES = @FINDLIB_DEPREQUIRES@
+CLEANREQUIRES = @FINDLIB_CLEANREQUIRES@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
OCAML_FLAGS = -pp $(CAMLP4O)
PKGS = -package "$(REQUIRES)"
CPKGS = -package "$(CREQUIRES)"
+DEPPKGS = -package "$(DEPREQUIRES)"
+CLEANPKGS = -package "$(CLEANREQUIRES)"
OCAML_THREADS_FLAGS = -thread
OCAML_DEBUG_FLAGS = -g
OCAMLC_FLAGS = $(OCAML_FLAGS) $(OCAML_THREADS_FLAGS)
CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS))
LIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES))
LIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES))
+CLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(CREQUIRES))
+CLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(CREQUIRES))
+DEPLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(DEPREQUIRES))
+DEPLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(DEPREQUIRES))
+CLEANLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(CLEANREQUIRES))
+CLEANLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(CLEANREQUIRES))
opt: matita.opt matitac.opt cicbrowser.opt matitadep.opt matitaclean.opt
else
opt:
matita.opt: $(LIBX_DEPS) $(CMXS) matita.ml
$(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml
-matitac: $(LIB_DEPS) $(CCMOS) matitac.ml
+matitac: $(CLIB_DEPS) $(CCMOS) matitac.ml
$(OCAMLC) $(CPKGS) -linkpkg -o $@ $(CCMOS) matitac.ml
-matitac.opt: $(LIBX_DEPS) $(CCMXS) matitac.ml
+matitac.opt: $(CLIBX_DEPS) $(CCMXS) matitac.ml
$(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) matitac.ml
-matitatop: matitatop.ml $(LIB_DEPS) $(CCMOS)
+matitatop: matitatop.ml $(CLIB_DEPS) $(CCMOS)
$(OCAMLC) $(CPKGS) -linkpkg -o $@ toplevellib.cma $(CCMOS) $<
-matitadep: matitadep.ml $(LIB_DEPS) $(CCMOS)
- $(OCAMLC) $(CPKGS) -linkpkg -o $@ $(CCMOS) $<
-matitadep.opt: matitadep.ml $(LIB_DEPS) $(CCMXS)
- $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) $<
+matitadep: matitadep.ml $(DEPLIB_DEPS) $(CCMOS)
+ $(OCAMLC) $(DEPPKGS) -linkpkg -o $@ $(CCMOS) $<
+matitadep.opt: matitadep.ml $(DEPLIB_DEPS) $(CCMXS)
+ $(OCAMLOPT) $(DEPPKGS) -linkpkg -o $@ $(CCMXS) $<
-matitaclean: matitaclean.ml $(LIB_DEPS) $(CCMOS)
- $(OCAMLC) $(CPKGS) -linkpkg -o $@ $(CCMOS) $<
-matitaclean.opt: matitaclean.ml $(LIB_DEPS) $(CCMXS)
- $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) $<
+matitaclean: matitaclean.ml $(CLEANLIB_DEPS) $(CCMOS)
+ $(OCAMLC) $(CLEANPKGS) -linkpkg -o $@ $(CCMOS) $<
+matitaclean.opt: matitaclean.ml $(CLEANLIB_DEPS) $(CCMXS)
+ $(OCAMLOPT) $(CLEANPKGS) -linkpkg -o $@ $(CCMXS) $<
cicbrowser: matita
@test -f $@ || ln -s $< $@
rm -f matita.glade.bak matita.gladep.bak
rm -rf autom4te.cache/
-tests: matitac
+tests: matitac matitadep matitaclean
(cd library && make clean all)
(cd tests && make clean all)
-tests.opt: matitac.opt
+tests.opt: matitac.opt matitadep.opt matitaclean.opt
(cd library && make clean.opt opt)
(cd tests && make clean.opt opt)
.PHONY: tests tests.opt
-SRC=\
- bool.ma\
- compare.ma\
- equality.ma\
- logic.ma\
- nat.ma \
- Z.ma
-
-MATITAC=../scripts/do_tests.sh ../matitac ../matitaclean /dev/null
-MATITACOPT=../scripts/do_tests.sh ../matitac.opt ../matitaclean.opt /dev/null
+SRC=$(wildcard *.ma)
+
+MATITAC=../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac ../matitaclean /dev/null
+MATITACOPT=../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac.opt ../matitaclean.opt /dev/null
VERBOSEMATITAC=../matitac
VERBOSEMATITACOPT=../matitac.opt
@make MATITAC="$(MATITACOPT)" MATITACLEAN="$(MATITACLEANOPT)" MATITADEP="$(MATITADEPOPT)" $(@:%.opt=%)
clean: $(LINKS)
- rm -f $(SRC:%.ma=%.moo)
- $(MATITACLEAN) all
+ @rm -f $(SRC:%.ma=%.moo)
+ @$(MATITACLEAN) all
depend: $(DEPEND_NAME)
@$(MATITAC) $< || $(MATITACLEAN) $<
$(DEPEND_NAME): $(SRC) $(LINKS)
- $(MATITADEP) $(SRC) > $@
+ @$(MATITADEP) $(SRC) > $@
# Let's prepare the environment
.matita:
- ln -s ../.matita .
+ @ln -s ../.matita .
matita.lang:
- ln -s ../matita.lang .
+ @ln -s ../matita.lang .
matita.conf.xml:
- ln -s ../matita.conf.xml .
+ @ln -s ../matita.conf.xml .
#done
include $(DEPEND_NAME)
-SRC= apply.ma auto.ma baseuri.ma coercions.ma comments.ma first.ma fguidi.ma\
- fix_betareduction.ma fold.ma inversion.ma letrec.ma match_inference.ma\
- mysql_escaping.ma record.ma replace.ma rewrite.ma second.ma simpl.ma\
- test2.ma test3.ma test4.ma third.ma
+SRC=$(wildcard *.ma)
-
-MATITAC=../scripts/do_tests.sh ../matitac ../matitaclean /dev/null
-MATITACOPT=../scripts/do_tests.sh ../matitac.opt ../matitaclean.opt /dev/null
+MATITAC=../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac ../matitaclean /dev/null
+MATITACOPT=../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac.opt ../matitaclean.opt /dev/null
VERBOSEMATITAC=../matitac
VERBOSEMATITACOPT=../matitac.opt
@make MATITAC="$(MATITACOPT)" MATITACLEAN="$(MATITACLEANOPT)" MATITADEP="$(MATITADEPOPT)" $(@:%.opt=%)
clean: $(LINKS)
- rm -f $(SRC:%.ma=%.moo)
- $(MATITACLEAN) all
+ @rm -f $(SRC:%.ma=%.moo)
+ @$(MATITACLEAN) all
depend: $(DEPEND_NAME)
@$(MATITAC) $< || $(MATITACLEAN) $<
$(DEPEND_NAME): $(SRC) $(LINKS)
- $(MATITADEP) $(SRC) > $@
+ @$(MATITADEP) $(SRC) > $@
# Let's prepare the environment
.matita:
- ln -s ../.matita .
+ @ln -s ../.matita .
matita.lang:
- ln -s ../matita.lang .
+ @ln -s ../matita.lang .
matita.conf.xml:
- ln -s ../matita.conf.xml .
+ @ln -s ../matita.conf.xml .
#done
include $(DEPEND_NAME)