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