X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2FLAMBDA-TYPES%2FMakefile;h=3e42a4ea18c5fd0fd93d5b0a149b47c6009aef07;hb=e78cf74f8976cf0ca554f64baa9979d0423ee927;hp=a7046636cd8f2bbfbb8ed7058aa910a17d31f443;hpb=ac6e72ade957c5ad253362b149140f7f9fd5ec5d;p=helm.git diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile index a7046636c..3e42a4ea1 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile +++ b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile @@ -1,65 +1,50 @@ include ../Makefile.defs +DIR=$(shell basename $$PWD) + H=@ MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass LOG = log.txt -DIRS = Legacy-2 Base-2 - -SILENTMAKE = $(H)$(MAKE) H=$(H) -s --no-print-directory - -MAS = $(patsubst %.mma, %.ma, $(shell find $(DIRS) -name "*.mma")) +MMAS = $(shell find -name "*.mma") +MAS = $(MMAS:%.mma=%.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 + $(H)$(RM) $(MAS) depend: - @echo matitadep - $(H)$(BIN)matitadep $(foreach DIR, $(DIRS), -exclude $(DIR)/theory.ma) -exclude LambdaDelta-2/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) -exclude LambdaDelta-2/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 - -include Legacy-2/.depend -include Base-2/.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