]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/Makefile.in
1f47f94817d0915f6331f8fb6aef38876e93859b
[helm.git] / helm / ocaml / Makefile.in
1 # Warning: the modules must be in compilation order
2 MODULES =                       \
3         pxp                     \
4         registry                \
5         thread                  \
6         xml                     \
7         urimanager              \
8         logger                  \
9         getter                  \
10         cic                     \
11         cic_annotations         \
12         cic_annotations_cache   \
13         cic_cache               \
14         cic_proof_checking      \
15         cic_textual_parser      \
16         tex_cic_textual_parser  \
17         cic_unification         \
18         mathql                  \
19         mathql_generator        \
20         mathql_interpreter      \
21         cic_omdoc               \
22         tactics                 \
23         hbugs                   \
24         cic_transformations     \
25         cic_textual_parser2
26
27 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
28 OCAMLFIND_META_DIR = @OCAMLFIND_META_DIR@
29
30 METAS = $(MODULES:%=METAS/META.helm-%)
31 CWD=`pwd`
32
33 all: metas $(MODULES:%=%.all)
34 opt: metas $(MODULES:%=%.opt)
35 world: all opt
36 metas: $(METAS)
37 depend: $(MODULES:%=%.depend)
38 install: $(MODULES:%=%.install)
39 uninstall: $(MODULES:%=%.uninstall)
40 clean: $(MODULES:%=%.clean)
41 clean_metas:
42         rm -f $(METAS)
43 distclean: clean clean_metas
44         rm -f Makefile Makefile.common configure config.log config.cache config.status
45
46 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
47
48 $(MODULES:%=%.all):
49         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.all=%) && make all
50 $(MODULES:%=%.opt):
51         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.opt=%) && make opt
52 $(MODULES:%=%.depend):
53         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.depend=%) && make depend
54 $(MODULES:%=%.install):
55         cd $(@:%.install=%) && make install
56         export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
57         cp METAS/$(@:%.install=meta.helm-%.src) $$TARGET && \
58         echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
59 $(MODULES:%=%.uninstall):
60         cd $(@:%.uninstall=%) && make uninstall
61         rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
62 $(MODULES:%=%.clean):
63         cd $(@:%.clean=%) && make clean
64 METAS/META.helm-%: METAS/meta.helm-%.src
65         cp $< $@ && echo "directory=\"$(CWD)/$*\"" >> $@
66
67 .PHONY: .dep.dot
68 .dep.dot:
69         echo "digraph G {" > $@
70         echo "   rankdir = TB ;" >> $@
71         for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
72         mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
73         echo "}" >> $@
74
75 .PHONY: .alldep.dot
76 .alldep.dot:
77         echo "digraph G {" > $@
78         echo "   rankdir = TB ;" >> $@
79         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
80         mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
81         for i in $(MODULES); do echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];" >> $@ ; done
82         echo "}" >> $@
83
84
85 libraries.ps: .dep.dot
86         dot -Tps -o $@ $<
87
88 libraries-complete.ps: .alldep.dot
89         dot -Tps -o $@ $<