X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2FLAMBDA-TYPES%2FMakefile;h=28fe09079f84806f751a0a68517b5a4aec05b707;hb=662f191b09d1b9e3d13e4f9ee5c174c1ac08fadb;hp=194fc389e5933faab1403df270a975f11c85cc61;hpb=deaa74701b73276ab7312911a56bee316c2ca110;p=helm.git diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile index 194fc389e..28fe09079 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile +++ b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile @@ -1,68 +1,39 @@ include ../Makefile.defs +DIR=$(shell basename $$PWD) + H=@ -S=-s MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass LOG = log.txt -DIRS = Legacy-2 Base-2 LambdaDelta-2 - -SILENTMAKE = $(H)$(MAKE) $(S) --no-print-directory H=$(H) S=$(S) - -MAS = $(shell find $(DIRS) -mindepth 2 -name "*.ma") +DEVELS = Legacy-2 Base-2 LambdaDelta-2 -all: depends - $(H)$(RM) $(LOG) - $(SILENTMAKE) build +MAS = $(shell find $(DEVELS) -mindepth 2 -name "*.ma") -opt all.opt: depends +$(DIR) all: $(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 - 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 + $(H)$(BIN)matitadep.opt $(MATITAOPTIONS) -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 - -$(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