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