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