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