]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/Makefile.in
- added -thread switch
[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         cic_textual_parser2
23
24 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
25 OCAMLFIND_META_DIR = @OCAMLFIND_META_DIR@
26
27 METAS = $(MODULES:%=METAS/META.helm-%)
28 CWD=`pwd`
29
30 all: metas $(MODULES:%=%.all)
31 opt: metas $(MODULES:%=%.opt)
32 metas: $(METAS)
33 depend: $(MODULES:%=%.depend)
34 install: $(MODULES:%=%.install)
35 uninstall: $(MODULES:%=%.uninstall)
36 clean: $(MODULES:%=%.clean) clean_metas
37 clean_metas:
38         rm -f $(METAS)
39
40 dist-clean: clean
41         rm -f Makefile Makefile.common configure config.log config.cache config.status
42
43 $(MODULES:%=%.all):
44         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.all=%) && make all
45 $(MODULES:%=%.opt):
46         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.opt=%) && make opt
47 $(MODULES:%=%.depend):
48         export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.depend=%) && make depend
49 $(MODULES:%=%.install):
50         cd $(@:%.install=%) && make install
51         export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
52         cp $(@:%.install=META.helm-%.src) $$TARGET && \
53         echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
54 $(MODULES:%=%.uninstall):
55         cd $(@:%.uninstall=%) && make uninstall
56         rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
57 $(MODULES:%=%.clean):
58         cd $(@:%.clean=%) && make clean
59 METAS/META.helm-%: METAS/meta.helm-%.src
60         cp $< $@ && echo "directory=\"$(CWD)/$*\"" >> $@
61
62 .PHONY: .dep.dot
63 .dep.dot:
64         echo "digraph G {" > $@
65         echo "   rankdir = TB ;" >> $@
66         for i in $(MODULES); do ocamlfind query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
67         mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
68         echo "}" >> $@
69
70 libraries.ps: .dep.dot
71         dot -Tps -o $@ $<