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