X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2FLAMBDA-TYPES%2FMakefile;h=3e42a4ea18c5fd0fd93d5b0a149b47c6009aef07;hb=d6a9ed2a08fcc4e3e26a40cde8cab88c2c69cb3a;hp=e44fbb49acf339c35dbe10dc65136e69a5ae4bae;hpb=9ece6e414b255f519426d5643782af4f7dfc584f;p=helm.git diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile index e44fbb49a..3e42a4ea1 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile +++ b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile @@ -1,68 +1,50 @@ include ../Makefile.defs +DIR=$(shell basename $$PWD) + H=@ MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass LOG = log.txt -DIRS = Legacy-2 Base-2 LambdaDelta-2 - -SILENTMAKE = $(H)$(MAKE) H=$(H) -s --no-print-directory +MMAS = $(shell find -name "*.mma") +MAS = $(MMAS:%.mma=%.ma) -MAS = $(shell find $(DIRS) -mindepth 2 -name "*.ma") - -all: depends +$(DIR) all: $(H)$(RM) $(LOG) - $(SILENTMAKE) build - -opt all.opt: depends - $(H)$(RM) $(LOG) - $(SILENTMAKE) build.opt - -%.build.opt: - $(SILENTMAKE) $(patsubst %.mma, %.ma, $(shell find $* -name "*.mma")) - $(H)echo $*/theory.ma `$(BIN)matitadep.opt -stdout $*/theory.ma` >> depends - -build: $(DIRS:%=%.build.opt) $(H)$(BIN)matitac $(MATITAOPTIONS) 2>> $(LOG) - $(H)$(RM) depends - -build.opt: $(DIRS:%=%.build.opt) +$(DIR).opt opt all.opt: + $(H)$(RM) $(LOG) $(H)$(BIN)matitac.opt $(MATITAOPTIONS) 2>> $(LOG) - $(H)$(RM) depends + +%.ma %.mma: + $(H)$(RM) $(LOG) + $(H)$(BIN)matitac $(MATITAOPTIONS) $@ 2>> $(LOG) +%.ma.opt: + $(H)$(RM) $(LOG) + $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $*.ma 2>> $(LOG) +%.mma.opt: + $(H)$(RM) $(LOG) + $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $*.mma 2>> $(LOG) clean: $(H)$(BIN)matitaclean $(MATITAOPTIONS) - $(H)rm -f $(MAS) depends - + $(H)$(RM) $(MAS) clean.opt: $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS) - $(H)rm -f $(MAS) depends - -clean.ma: - $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS) $(MAS) - $(H)$(RM) $(MAS) depends - - -clean.mma: -# $(H)for FILE in */*.mma ; do if [ -e ../LambdaDelta-1/$${FILE/.mma/.ma} ] ; then true ; else rm $$FILE ; fi done + $(H)$(RM) $(MAS) depend: - @echo matitadep - $(H)$(BIN)matitadep $(foreach DIR, $(DIRS), -exclude $(DIR)/theory.ma) - $(H)cat $(DIRS:%=%/depends) >> depends - + $$(H)(BIN)matitadep $(MATITAOPTIONS) depend.opt: - @echo matitadep.opt - $(H)$(BIN)matitadep.opt $(foreach DIR, $(DIRS), -exclude $(DIR)/theory.ma) - $(H)cat $(DIRS:%=%/depends) >> depends - -depends: depend.opt - -%.ma: %.mma - $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $(word 3,$(shell grep -h $< */depends)) `$(BIN)matitadep.opt -stdout $<` 2>> $(LOG) - $(H)$(BIN)matitac.opt $(MATITAOPTIONS) -dump $@ $< 2>> $(LOG) - $(H)echo $@ `$(BIN)matitadep.opt -stdout $@` >> depends + $(H)$(BIN)matitadep.opt $(MATITAOPTIONS) -$(foreach DIR, $(DIRS), $(eval include $(DIR)/.depend)) +ifneq ($(strip $(MAS)),) +clean.ma: + $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS) $(MAS) + $(H)$(RM) $(MAS) +else +clean.ma: + $(H)echo no files to clean +endif