]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/Makefile.in
added support for cic_textual_parser2 module
[helm.git] / helm / ocaml / Makefile.in
1 # Warning: the modules must be in compilation order
2 MODULES = xml urimanager getter pxp cic cic_annotations cic_annotations_cache \
3           cic_cache cic_proof_checking cic_textual_parser \
4           cic_textual_parser2 \
5           tex_cic_textual_parser cic_unification mathql mathql_generator \
6           mathql_interpreter cic_omdoc tactics cic_transformations
7
8 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
9 OCAMLFIND_META_DIR = @OCAMLFIND_META_DIR@
10
11 METAS = $(MODULES:%=META.helm-%)
12 CWD=`pwd`
13
14 all: $(METAS) $(MODULES:%=%.all)
15 opt: $(METAS) $(MODULES:%=%.opt)
16 depend: $(MODULES:%=%.depend)
17 install: $(MODULES:%=%.install)
18 uninstall: $(MODULES:%=%.uninstall)
19 clean: $(MODULES:%=%.clean)
20         rm -f $(METAS)
21
22 dist-clean: clean
23         rm -f Makefile Makefile.common configure config.log config.cache config.status
24
25 $(MODULES:%=%.all):
26         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.all=%) && make all
27 $(MODULES:%=%.opt):
28         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.opt=%) && make opt
29 $(MODULES:%=%.depend):
30         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.depend=%) && make depend
31 $(MODULES:%=%.install):
32         cd $(@:%.install=%) && make install
33         export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
34         cp $(@:%.install=META.helm-%.src) $$TARGET && \
35         echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
36 $(MODULES:%=%.uninstall):
37         cd $(@:%.uninstall=%) && make uninstall
38         rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
39 $(MODULES:%=%.clean):
40         cd $(@:%.clean=%) && make clean
41 META.helm-%: META.helm-%.src
42         cp $< $@ && echo "directory=\"$(CWD)/$(@:META.helm-%=%)\"" >> $@
43
44 .PHONY: .dep.dot
45 .dep.dot:
46         echo "digraph G {" > $@
47         echo "   rankdir = TB ;" >> $@
48         for i in $(MODULES); do ocamlfind query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
49         mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
50         echo "}" >> $@
51
52 libraries.ps: .dep.dot
53         dot -Tps -o $@ $<