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