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 \
5 tex_cic_textual_parser cic_unification mathql mathql_generator \
6 mathql_interpreter cic_omdoc tactics cic_transformations
8 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
9 OCAMLFIND_META_DIR = @OCAMLFIND_META_DIR@
11 METAS = $(MODULES:%=META.helm-%)
14 all: $(METAS) $(MODULES:%=%.all)
15 opt: $(METAS) $(MODULES:%=%.opt)
16 depend: $(MODULES:%=%.depend)
17 install: $(MODULES:%=%.install)
18 uninstall: $(MODULES:%=%.uninstall)
19 clean: $(MODULES:%=%.clean)
23 rm -f Makefile Makefile.common configure config.log config.cache config.status
26 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.all=%) && make all
28 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.opt=%) && make opt
29 $(MODULES:%=%.depend):
30 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.depend=%) && make depend
31 $(MODULES:%=%.install):
32 cd $(@:%.install=%) && make install
33 export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
34 cp $(@:%.install=META.helm-%.src) $$TARGET && \
35 echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
36 $(MODULES:%=%.uninstall):
37 cd $(@:%.uninstall=%) && make uninstall
38 rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
40 cd $(@:%.clean=%) && make clean
41 META.helm-%: META.helm-%.src
42 cp $< $@ && echo "directory=\"$(CWD)/$(@:META.helm-%=%)\"" >> $@
46 echo "digraph G {" > $@
47 echo " rankdir = TB ;" >> $@
48 for i in $(MODULES); do ocamlfind query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
49 mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
52 libraries.ps: .dep.dot