]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/LAMBDA-TYPES/Makefile
9608434b6afc4f115a1e431456bada8527380578
[helm.git] / helm / software / matita / contribs / LAMBDA-TYPES / Makefile
1 include ../Makefile.defs
2
3 H=@
4
5 MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass
6
7 DIR=$(shell basename $$PWD)
8
9 LOG = log.txt
10
11 MMAS = $(shell find Legacy-2 Base-2 -name "*.mma") 
12 MAS = $(MMAS:%.mma=%.ma)
13 XMAS = Legacy-2/theory.ma Base-2/theory.ma LambdaDelta-2/theory.ma
14
15 $(DIR) all: depends
16         $(H)$(RM) $(LOG)
17         $(H)$(MAKE) H=$(H) --no-print-directory build
18
19 $(DIR).opt opt all.opt: depends
20         $(H)$(RM) $(LOG)
21         $(H)$(MAKE) H=$(H) --no-print-directory build.opt
22
23 build: $(MAS)
24         $(H)echo Legacy-2/theory.ma `$(BIN)matitadep.opt -stdout Legacy-2/theory.ma` >> depends
25         $(H)echo Base-2/theory.ma `$(BIN)matitadep.opt -stdout Base-2/theory.ma` >> depends
26         $(H)$(BIN)matitac $(MATITAOPTIONS) 2>> $(LOG)
27         $(H)$(RM) depends
28
29 build.opt: $(MAS)
30         $(H)echo Legacy-2/theory.ma `$(BIN)matitadep.opt -stdout Legacy-2/theory.ma` >> depends
31         $(H)echo Base-2/theory.ma `$(BIN)matitadep.opt -stdout Base-2/theory.ma` >> depends
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 -f $(MAS) depends
46
47 depend:
48         @echo matitadep
49         $(H)$(BIN)matitadep $(foreach FILE,$(XMAS),-exclude $(FILE))
50         $(H)cat Legacy-2/depends Base-2/depends >> depends
51         
52 depend.opt:
53         @echo matitadep.opt
54         $(H)$(BIN)matitadep.opt $(foreach FILE,$(XMAS),-exclude $(FILE))
55         $(H)cat Legacy-2/depends Base-2/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