]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/Makefile.in
- s/decompilation/cleaning/
[helm.git] / helm / ocaml / Makefile.in
1 # Warning: the modules must be in compilation order
2 NULL =
3 MODULES =                       \
4         extlib                  \
5         xml                     \
6         hgdome                  \
7         registry                \
8         hmysql                  \
9         utf8_macros             \
10         thread                  \
11         xmldiff                 \
12         urimanager              \
13         logger                  \
14         getter                  \
15         cic                     \
16         cic_proof_checking      \
17         cic_acic                \
18         acic_content            \
19         content_pres            \
20         grafite                 \
21         metadata                \
22         library                 \
23         cic_unification         \
24         whelp                   \
25         tactics                 \
26         cic_disambiguation      \
27         lexicon                 \
28         grafite_engine          \
29         grafite_parser          \
30         tactics/paramodulation \
31         $(NULL)
32
33 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
34 OCAMLPATH = @OCAMLFIND_META_DIR@
35 OCAMLFIND = OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH @OCAMLFIND@
36
37 METAS = $(filter-out %/paramodulation,$(MODULES:%=METAS/META.helm-%))
38
39 all: metas $(MODULES:%=%.all) 
40 opt: metas $(MODULES:%=%.opt)
41 world: all opt
42 metas: $(METAS)
43 depend: $(MODULES:%=%.depend)
44 install: $(MODULES:%=%.install)
45 uninstall: $(MODULES:%=%.uninstall)
46 clean: $(MODULES:%=%.clean)
47
48 clean_metas:
49         rm -f $(METAS)
50 distclean: clean clean_metas
51         rm -f Makefile Makefile.common configure config.log config.cache config.status
52
53 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
54
55 %.all:
56         OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* all
57 %.opt:
58         OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* opt
59 %.clean:
60         OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* clean
61 %.depend:
62         OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* depend
63
64 $(MODULES:%=%.install):
65         cd $(@:%.install=%) && make install
66         export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
67         cp METAS/$(@:%.install=meta.helm-%.src) $$TARGET && \
68         echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
69 $(MODULES:%=%.uninstall):
70         cd $(@:%.uninstall=%) && make uninstall
71         rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
72 METAS/META.helm-%: METAS/meta.helm-%.src
73         cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
74
75 .PHONY: .dep.dot
76 .dep.dot:
77         echo "digraph G {" > $@
78         echo "   rankdir = TB ;" >> $@
79         for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
80         mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
81         echo "}" >> $@
82
83 .PHONY: .alldep.dot
84 .alldep.dot:
85         echo "digraph G {" > $@
86         echo "   rankdir = TB ;" >> $@
87         for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep -v "pxp-" | sed "s/^pxp/pxp[-*]/g" | sed "s/^/ \"helm-$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
88         mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
89         for i in $(MODULES); do echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];" >> $@ ; done
90         echo "}" >> $@
91
92 .extdep.dot: .dep.dot
93         ./patch_deps.sh $< $@
94 .clustersdep.dot: .dep.dot
95         USE_CLUSTERS=yes ./patch_deps.sh $< $@
96
97 libraries.ps: .dep.dot
98         dot -Tps -o $@ $<
99 libraries-ext.ps: .extdep.dot
100         dot -Tps -o $@ $<
101 libraries-clusters.ps: .clustersdep.dot
102         dot -Tps -o $@ $<
103 libraries-complete.ps: .alldep.dot
104         dot -Tps -o $@ $<
105
106 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
107
108 tags: TAGS
109 .PHONY: TAGS
110 TAGS:
111         otags -vi -r .
112