1 # Warning: the modules must be in compilation order
27 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
28 OCAMLFIND_META_DIR = @OCAMLFIND_META_DIR@
30 METAS = $(MODULES:%=METAS/META.helm-%)
33 all: metas $(MODULES:%=%.all)
34 opt: metas $(MODULES:%=%.opt)
37 depend: $(MODULES:%=%.depend)
38 install: $(MODULES:%=%.install)
39 uninstall: $(MODULES:%=%.uninstall)
40 clean: clean_metas $(MODULES:%=%.clean)
43 distclean: clean clean_metas
44 rm -f Makefile Makefile.common configure config.log config.cache config.status
46 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
49 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.all=%) && make all
51 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.opt=%) && make opt
52 $(MODULES:%=%.depend):
53 export OCAMLPATH=$(CWD):$$OCAMLPATH ; cd $(@:%.depend=%) && make depend
54 $(MODULES:%=%.install):
55 cd $(@:%.install=%) && make install
56 export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
57 cp METAS/$(@:%.install=meta.helm-%.src) $$TARGET && \
58 echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
59 $(MODULES:%=%.uninstall):
60 cd $(@:%.uninstall=%) && make uninstall
61 rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
63 cd $(@:%.clean=%) && make clean
64 METAS/META.helm-%: METAS/meta.helm-%.src
65 cp $< $@ && echo "directory=\"$(CWD)/$*\"" >> $@
69 echo "digraph G {" > $@
70 echo " rankdir = TB ;" >> $@
71 for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
72 mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
77 echo "digraph G {" > $@
78 echo " rankdir = TB ;" >> $@
79 for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep -v "pxp-" | sed "s/^pxp/pxp[-*]/g" | sed "s/^/ \"helm-$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
80 mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
81 for i in $(MODULES); do echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];" >> $@ ; done
84 libraries.ps: .dep.dot
87 libraries-complete.ps: .alldep.dot