]> matita.cs.unibo.it Git - helm.git/blob - helm/software/helena/Makefile
refactoring ...
[helm.git] / helm / software / helena / Makefile
1 MAIN = helena
2
3 SRC  = src
4
5 REQUIRES = unix str helm-ng_kernel
6
7 OCAMLOPTIONS = -rectypes 
8
9 KEEP = README
10
11 CLEAN = etc/log.txt etc/profile.txt
12
13 TAGS = test-si test-si-fast profile xml-si xml-si-crg html test-html \
14        install-html install-lddl install-dtd install-xml instal-css
15
16
17 XMLS = xml/brg-si/grundlagen/l/not.ld.xml \
18        xml/brg-si/grundlagen/l/et.ld.xml \
19        xml/brg-si/grundlagen/l/e/st/eq/landau/n/rt/rp/r/c/8283/t234.ld.xml \
20        xml/brg-si/grundlagen/l/e/pairis1.ld.xml \
21        xml/brg-si/grundlagen/l/e/st/eq/landau/n/327/t25.ld.xml \
22        xml/crg-si/grundlagen/l/not.ld.xml \
23        xml/crg-si/grundlagen/l/et.ld.xml \
24        xml/crg-si/grundlagen/l/e/st/eq/landau/n/rt/rp/r/c/8283/t234.ld.xml \
25        xml/crg-si/grundlagen/l/e/pairis1.ld.xml \
26        xml/crg-si/grundlagen/l/e/st/eq/landau/n/327/t25.ld.xml \
27        xml/brg-si/grundlagen/ccs.ldc.xml
28
29 include Makefile.common
30
31 INPUT = examples/grundlagen/grundlagen.aut
32
33 SLS = helena.sl automath.sl
34
35 test-si: $(MAIN).opt etc
36         @echo "  HELENA -p -o -c $(INPUT)"
37         $(H)./$(MAIN).opt -p -o -c -S 3 $(O) $(INPUT) > etc/log.txt
38
39 test-si-fast: $(MAIN).opt etc
40         @echo "  HELENA -o -q $(INPUT)"
41         $(H)./$(MAIN).opt -o -q -S 1 $(O) $(INPUT) > etc/log.txt
42
43 profile: $(MAIN).opt etc
44         @echo "  HELENA -o -q $(INPUT) (30 TIMES)"
45         $(H)rm etc/log.txt
46         $(H)for T in `seq 30`; do ./$(MAIN).opt -o -q -s 3 -S 1 $(O) $(INPUT) >> etc/log.txt; done
47         $(H)grep "at exit" etc/log.txt | sort | uniq > etc/profile-new.txt
48
49 xml-si: $(MAIN).opt etc
50         @echo "  HELENA -o -x -s 2 $(INPUT)"
51         $(H)./$(MAIN).opt -o -x -s 2 -S 1 $(INPUT) > etc/log.txt
52
53 xml-si-crg: $(MAIN).opt etc
54         @echo "  HELENA -o -x -s 1 $(INPUT)"
55         $(H)./$(MAIN).opt -o -x -s 1 -S 1 $(INPUT) > etc/log.txt
56
57 etc:
58         @echo "  MKDIR etc"
59         $(H)mkdir etc
60
61 %.ld: BASEURL = --stringparam baseurl $(LDDLURL)
62
63 %.ld:
64         @echo "  XSLT $@"
65         $(H)mkdir -p $(LOCALLDDLDIR)/$(@D)
66         $(H)$(XSLT) -o $(LOCALLDDLDIR)/$@.html $(BASEURL) xml/ld-html.xsl xml/$@.xml
67
68 %.ldc:
69         @echo "  SKIP $@"
70
71 etc/make-html.sh xml/index.txt index:
72         @echo "  GENERATE INDEXES"
73         $(H)find xml -name "*.ld.xml" | sed s/.xml//g | sed s/xml/ld:/g > xml/index.txt
74         $(H)sed "s/^/make --no-print-directory /" xml/index.txt | sed s.ld:/.. > etc/make-html.sh
75
76 html: etc/make-html.sh
77         @echo "  MAKE */*.ld"
78         $(H). $<
79
80 test-html:
81         @$(MAKE) --no-print-directory $(XMLS:xml/%.xml=%)
82
83 install-html: etc/make-html.sh
84         @echo "  INSTALL xml"
85         $(H)scp -r $(LOCALLDDLDIR)/* $(LDDLDIR)
86
87 install-lddl: index
88         @echo "  INSTALL lddl.tar.bz2"
89         $(H)tar -cjf etc/lddl.tar.bz2 -X etc/exclude.txt xml
90         $(H)scp etc/lddl.tar.bz2 $(DOWNDIR)
91
92 install-dtd: xml/ld.dtd
93         @echo "  INSTALL $<"
94         $(H)scp $< $(XMLDIR)
95
96 install-css: xml/ld-html.css
97         @echo "  INSTALL $<"
98         $(H)scp $< $(LDDLDIR)
99
100 install-xml: etc/make-html.sh
101         @echo "  INSTALL xml"
102         $(H)scp -r xml/index.txt xml/ld.dtd xml/brg-si/ xml/crg-si/ $(XMLDIR)
103
104 install-icons:
105         @echo "  INSTALL *.png *.ico"
106         $(H)scp icons/*.png icons/*.ico $(DOWNDIR)
107
108 install-jed:
109         @echo "  INSTALL $(SLS)"
110         $(H)scp $(SLS:%=$(HOME)/jed/%) $(DOWNDIR)