]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/LAMBDA-TYPES/Makefile
matita 0.5.1 tagged
[helm.git] / 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 MMAS = $(shell find Legacy-2 -name "*.mma")
10 # Base-2 
11 MAS = $(MMAS:%.mma=%.ma)
12 XMAS = Legacy-2/theory.ma Base-2/theory.ma LambdaDelta-2/theory.ma
13
14 $(DIR) all: depends
15         $(H)$(MAKE) H=$(H) --no-print-directory build
16
17 $(DIR).opt opt all.opt: depends
18         $(H)$(MAKE) H=$(H) --no-print-directory build.opt
19
20 build: $(MAS)
21         $(H)echo Legacy-2/theory.ma `$(BIN)matitadep.opt -stdout Legacy-2/theory.ma` >> depends
22 #       $(H)echo Base-2/theory.ma `$(BIN)matitadep.opt -stdout Base-2/theory.ma` >> depends
23         $(H)$(BIN)matitac $(MATITAOPTIONS) 2> /dev/null
24         $(H)rm depends
25
26 build.opt: $(MAS)
27         $(H)echo Legacy-2/theory.ma `$(BIN)matitadep.opt -stdout Legacy-2/theory.ma` >> depends
28 #       $(H)echo Base-2/theory.ma `$(BIN)matitadep.opt -stdout Base-2/theory.ma` >> depends
29         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) 2> /dev/null
30         $(H)rm depends
31
32 clean:
33         $(H)$(BIN)matitaclean $(MATITAOPTIONS)
34         $(H)rm -f $(MAS) depends
35
36 clean.opt:
37         $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS)
38         $(H)rm -f $(MAS) depends
39
40 clean.ma:
41         $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS) $(MAS)
42         $(H)rm -f $(MAS) depends
43
44 depend:
45         @echo matitadep
46         $(H)$(BIN)matitadep $(foreach FILE,$(XMAS),-exclude $(FILE))
47         $(H)cat Legacy-2/depends >> depends
48 # Base-2/depends
49         
50 depend.opt:
51         @echo matitadep.opt
52         $(H)$(BIN)matitadep.opt $(foreach FILE,$(XMAS),-exclude $(FILE))
53         $(H)cat Legacy-2/depends >> depends
54 # Base-2/depends
55
56 depends: depend.opt
57
58 %.ma: %.mma
59         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $(word 3,$(shell grep -h $< */depends)) `$(BIN)matitadep.opt -stdout $<` 2> /dev/null
60         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) -dump $@ $< 2> /dev/null
61         $(H)echo $@ `$(BIN)matitadep.opt -stdout $@` >> depends
62
63 include Legacy-2/.depend
64 # include Base-2/.depend