From: Enrico Tassi Date: Fri, 1 Jul 2005 17:59:48 +0000 (+0000) Subject: more makefile work X-Git-Tag: PRE_GETTER_STORAGE~35 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=76a45dfa7d4a7708797930f8c9025f63a66910cb;p=helm.git more makefile work --- diff --git a/helm/matita/Makefile.in b/helm/matita/Makefile.in index b0b1fe522..648a7fbf6 100644 --- a/helm/matita/Makefile.in +++ b/helm/matita/Makefile.in @@ -5,11 +5,15 @@ CAMLP4O = @CAMLP4O@ 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) @@ -56,6 +60,12 @@ CMXS = $(patsubst %.cmo,%.cmx,$(CMOS)) 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: @@ -67,23 +77,23 @@ matita: $(LIB_DEPS) $(CMOS) matita.ml 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 $< $@ @@ -115,10 +125,10 @@ distclean: clean 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 diff --git a/helm/matita/configure.ac b/helm/matita/configure.ac index 745b4dfbe..a46024ba6 100644 --- a/helm/matita/configure.ac +++ b/helm/matita/configure.ac @@ -26,17 +26,19 @@ if test $HAVE_CAMLP4O = "yes"; then else AC_MSG_ERROR(could not find camlp4o) fi - -FINDLIB_CREQUIRES="\ +FINDLIB_DEPREQUIRES="\ pcre \ mysql \ +helm-registry \ +helm-cic_textual_parser2 \ +" +FINDLIB_CLEANREQUIRES="$FINDLIB_DEPREQUIRES" +FINDLIB_CREQUIRES="\ +$FINDLIB_CLEANREQUIRES \ unix \ helm-cic_omdoc \ -helm-cic_transformations \ -helm-registry \ helm-tactics \ helm-xml \ -helm-cic_textual_parser2 \ " FINDLIB_REQUIRES="\ $FINDLIB_CREQUIRES \ @@ -94,6 +96,8 @@ AC_SUBST(DEBUG) AC_SUBST(TRANSFORMER_MODULE) AC_SUBST(FINDLIB_REQUIRES) AC_SUBST(FINDLIB_CREQUIRES) +AC_SUBST(FINDLIB_DEPREQUIRES) +AC_SUBST(FINDLIB_CLEANREQUIRES) AC_SUBST(HAVE_OCAMLOPT) AC_SUBST(LABLGLADECC) AC_SUBST(OCAMLFIND) diff --git a/helm/matita/library/Makefile b/helm/matita/library/Makefile index 69e33b3c7..be8a19266 100644 --- a/helm/matita/library/Makefile +++ b/helm/matita/library/Makefile @@ -1,13 +1,7 @@ -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 @@ -35,8 +29,8 @@ verboseopt: @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) @@ -45,17 +39,17 @@ 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) diff --git a/helm/matita/scripts/do_tests.sh b/helm/matita/scripts/do_tests.sh index 79fba09de..687cb26d7 100755 --- a/helm/matita/scripts/do_tests.sh +++ b/helm/matita/scripts/do_tests.sh @@ -40,6 +40,7 @@ TMP=.__temp.txt for T in $TODO; do printf "$COMPILER\t%-30s " $T if [ "$TWICE" = "1" ]; then + $CLEANER $T 1>/dev/null 2>/dev/null $COMPILER $T 1>/dev/null 2>/dev/null fi $CLEANER $T 1>/dev/null 2>/dev/null diff --git a/helm/matita/scripts/profile_cvs.sh b/helm/matita/scripts/profile_cvs.sh index f0cc00e8b..947a4c0a0 100755 --- a/helm/matita/scripts/profile_cvs.sh +++ b/helm/matita/scripts/profile_cvs.sh @@ -8,8 +8,8 @@ function testit { LOGTOOPT=/dev/null LOGTOBYTE=/dev/null export DO_TESTS_EXTRA="$MARK\t$@" - scripts/do_tests.sh -no-color -twice ./matitac.opt $LOGTOOPT tests/*.ma - scripts/do_tests.sh -no-color -twice ./matitac $LOGTOBYTE tests/*.ma + make tests DO_TEST_OPTS="-no-color -twice" + make tests.opt DO_TEST_OPTS="-no-color -twice" } function compile { diff --git a/helm/matita/tests/Makefile b/helm/matita/tests/Makefile index 7eee097ed..73cf367a9 100644 --- a/helm/matita/tests/Makefile +++ b/helm/matita/tests/Makefile @@ -1,11 +1,7 @@ -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 @@ -33,8 +29,8 @@ verboseopt: @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) @@ -43,17 +39,17 @@ 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)