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:%=METAS/META.helm-%)
13 all: metas $(MODULES:%=%.all)
14 opt: metas $(MODULES:%=%.opt)
16 depend: $(MODULES:%=%.depend)
17 install: $(MODULES:%=%.install)
18 uninstall: $(MODULES:%=%.uninstall)
19 clean: $(MODULES:%=%.clean) clean_metas
24 rm -f Makefile Makefile.common configure config.log config.cache config.status
27 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.all=%) && make all
29 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.opt=%) && make opt
30 $(MODULES:%=%.depend):
31 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.depend=%) && make depend
32 $(MODULES:%=%.install):
33 cd $(@:%.install=%) && make install
34 export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
35 cp $(@:%.install=META.helm-%.src) $$TARGET && \
36 echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
37 $(MODULES:%=%.uninstall):
38 cd $(@:%.uninstall=%) && make uninstall
39 rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
41 cd $(@:%.clean=%) && make clean
42 METAS/META.helm-%: METAS/meta.helm-%.src
43 cp $< $@ && echo "directory=\"$(CWD)/$*\"" >> $@
47 echo "digraph G {" > $@
48 echo " rankdir = TB ;" >> $@
49 for i in $(MODULES); do ocamlfind query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
50 mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
53 libraries.ps: .dep.dot