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