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