]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/LAMBDA-TYPES/Makefile
- lambda-delta: some speed up (not very much :) actually)
[helm.git] / helm / software / matita / contribs / LAMBDA-TYPES / Makefile
1 include ../Makefile.defs
2
3 H=@
4
5 MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass
6
7 LOG = log.txt
8
9 DIRS = Legacy-2 Base-2
10
11 SILENTMAKE = $(H)$(MAKE) H=$(H) -s --no-print-directory
12
13 MAS = $(patsubst %.mma, %.ma, $(shell find $(DIRS) -name "*.mma"))
14
15 all: depends
16         $(H)$(RM) $(LOG)
17         $(SILENTMAKE) build
18
19 opt all.opt: depends
20         $(H)$(RM) $(LOG)
21         $(SILENTMAKE) build.opt
22
23 %.build.opt:
24         $(SILENTMAKE) $(patsubst %.mma, %.ma, $(shell find $* -name "*.mma"))
25         $(H)echo $*/theory.ma `$(BIN)matitadep.opt -stdout $*/theory.ma` >> depends
26
27 build: $(DIRS:%=%.build.opt)
28         $(H)$(BIN)matitac $(MATITAOPTIONS) 2>> $(LOG)
29         $(H)$(RM) depends
30
31 build.opt: $(DIRS:%=%.build.opt)
32         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) 2>> $(LOG)
33         $(H)$(RM) depends
34
35 clean:
36         $(H)$(BIN)matitaclean $(MATITAOPTIONS)
37         $(H)rm -f $(MAS) depends
38
39 clean.opt:
40         $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS)
41         $(H)rm -f $(MAS) depends
42
43 clean.ma:
44         $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS) $(MAS)
45         $(H)$(RM) $(MAS) depends
46
47 depend:
48         @echo matitadep
49         $(H)$(BIN)matitadep $(foreach DIR, $(DIRS), -exclude $(DIR)/theory.ma) -exclude LambdaDelta-2/theory.ma
50         $(H)cat $(DIRS:%=%/depends) >> depends
51
52 depend.opt:
53         @echo matitadep.opt
54         $(H)$(BIN)matitadep.opt $(foreach DIR, $(DIRS), -exclude $(DIR)/theory.ma) -exclude LambdaDelta-2/theory.ma
55         $(H)cat $(DIRS:%=%/depends) >> depends
56
57 depends: depend.opt
58
59 %.ma: %.mma
60         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $(word 3,$(shell grep -h $< */depends)) `$(BIN)matitadep.opt -stdout $<` 2>> $(LOG)
61         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) -dump $@ $< 2>> $(LOG)
62         $(H)echo $@ `$(BIN)matitadep.opt -stdout $@` >> depends
63
64 include Legacy-2/.depend
65 include Base-2/.depend