X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2FMakefile;h=e13b3e8a48d6c05fb5e07f19043e285192c24309;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=ed81e3eca185e98367d475811edf5167e6ebd141;hpb=822aaaeb5bb49fb6547242e28a6f19f22bf5f105;p=helm.git diff --git a/helm/matita/library/Makefile b/helm/matita/library/Makefile index ed81e3eca..e13b3e8a4 100644 --- a/helm/matita/library/Makefile +++ b/helm/matita/library/Makefile @@ -1,52 +1,54 @@ -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 -VERBOSEMATITAC=../matitac -VERBOSEMATITACOPT=../matitac.opt +SRC=$(shell find . -name "*.ma" -a -type f) -DEPEND_NAME=.depend -LINKS=.matita matita.lang matita.conf.xml +MATITA_FLAGS = +NODB=false +ifeq ($(NODB),true) + MATITA_FLAGS += -nodb +endif -all: $(LINKS) $(SRC:%.ma=%.moo) +MATITAC=../scripts/do_tests.sh $(DO_TESTS_OPTS) "../matitac $(MATITA_FLAGS)" "../matitaclean $(MATITA_FLAGS)" /dev/null OK +MATITACOPT=../scripts/do_tests.sh $(DO_TESTS_OPTS) "../matitac.opt $(MATITA_FLAGS)" "../matitaclean.opt $(MATITA_FLAGS)" /dev/null OK +VERBOSEMATITAC=../matitac $(MATITA_FLAGS) +VERBOSEMATITACOPT=../matitac.opt $(MATITA_FLAGS) -opt: - make MATITAC=$(MATITACOPT) all +MATITACLEAN=../matitaclean $(MATITA_FLAGS) +MATITACLEANOPT=../matitaclean.opt $(MATITA_FLAGS) -verbose.opt: - make MATITAC=$(VERBOSEMATITAC) all +MATITADEP=../matitadep $(MATITA_FLAGS) +MATITADEPOPT=../matitadep.opt $(MATITA_FLAGS) + +DEPEND_NAME=.depend -verboseopt: - make MATITAC=$(VERBOSEMATITACOPT) all +H=@ + +all: $(SRC:%.ma=%.mo) + +opt: + $(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' all -clean: $(LINKS) - rm -f $(SRC:%.ma=%.moo) - ../matitaclean all +verbose: + $(H)$(MAKE) MATITAC='$(VERBOSEMATITAC)' MATITACLEAN='$(MATITACLEAN)' MATITADEP='$(MATITADEP)' all -depend: $(DEPEND_NAME) +%.opt: + $(H)$(MAKE) MATITAC='$(MATITACOPT)' MATITACLEAN='$(MATITACLEANOPT)' MATITADEP='$(MATITADEPOPT)' $(@:%.opt=%) -%.moo:%.ma depend $(LINKS) - @[ ! -e $@ ] || ../matitaclean $< - @$(MATITAC) $< || ../matitaclean $< +clean: + $(H)$(MATITACLEAN) $(SRC) -$(DEPEND_NAME): $(SRC) $(LINKS) - ../matitadep $(SRC) > $@ +cleanall: + $(H)rm -f $(SRC:%.ma=%.moo) + $(MATITACLEAN) all -# Let's prepare the environment -.matita: - ln -s ../.matita . +depend: + rm -f $(DEPEND_NAME) + $(MAKE) $(DEPEND_NAME) +.PHONY: depend -matita.lang: - ln -s ../matita.lang . +%.moo: + $(H)$(MATITAC) $< -matita.conf.xml: - ln -s ../matita.conf.xml . -#done +$(DEPEND_NAME): $(SRC) + $(H)$(MATITADEP) $(SRC) > $@ || rm -f $@ -include $(DEPEND_NAME) +#include $(DEPEND_NAME) +include .depend