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