]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/procedural/Makefile.common
- MatitaMisc: we factorized here the function out_preamble used in matitadep
[helm.git] / helm / software / matita / contribs / procedural / Makefile.common
1 BIN = ../../../
2
3 DIR = $(shell basename $$PWD)
4
5 H = @
6
7 TRANSCRIPT = $(BIN)../components/binaries/transcript/transcript.opt
8
9 LOG = log.txt
10
11 MMAS = $(shell find -name "*.mma")
12 MAS = $(MMAS:%.mma=%.ma)
13
14 $(DIR) all:
15         $(H)$(RM) $(LOG)
16         $(H)$(BIN)matitac $(MATITAOPTIONS) 2>> $(LOG)
17 $(DIR).opt opt all.opt:
18         $(H)$(RM) $(LOG)
19         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) 2>> $(LOG)
20
21 %.ma %.mma: 
22         $(H)$(RM) $(LOG)
23         $(H)$(BIN)matitac $(MATITAOPTIONS) $@ 2>> $(LOG)
24 %.ma.opt: 
25         $(H)$(RM) $(LOG)
26         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $*.ma 2>> $(LOG)
27 %.mma.opt: 
28         $(H)$(RM) $(LOG)
29         $(H)$(BIN)matitac.opt $(MATITAOPTIONS) $*.mma 2>> $(LOG)
30
31 clean:
32         $(H)$(BIN)matitaclean $(MATITAOPTIONS)
33         $(H)$(RM) $(MAS)
34 clean.opt:
35         $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS)
36         $(H)$(RM) $(MAS)
37 depend:
38         $(H)(BIN)matitadep $(MATITAOPTIONS)
39 depend.opt:
40         $(H)$(BIN)matitadep.opt $(MATITAOPTIONS)
41
42 ifneq ($(strip $(MAS)),)
43 clean.ma:
44         $(H)$(BIN)matitaclean.opt $(MATITAOPTIONS) $(MAS)
45         $(H)$(RM) $(MAS)
46 else
47 clean.ma:
48         $(H)echo no files to clean
49 endif
50
51 mma: $(DEVEL).conf.xml clean.ma
52         $(H)$(TRANSCRIPT) $(TRANSCRIPTOPTIONS) -C $(BIN) $(DEVEL)