1 # Warning: the modules must be in compilation order
33 OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
34 OCAMLPATH = @OCAMLFIND_META_DIR@
35 OCAMLFIND = OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH @OCAMLFIND@
37 METAS = $(MODULES:%=METAS/META.helm-%) METAS/META.helm-cic_disambiguation
39 all: metas $(MODULES:%=%.all)
40 opt: metas $(MODULES:%=%.opt)
43 depend: $(MODULES:%=%.depend)
44 install: $(MODULES:%=%.install)
45 uninstall: $(MODULES:%=%.uninstall)
46 clean: $(MODULES:%=%.clean)
49 distclean: clean clean_metas
50 rm -f Makefile Makefile.common configure config.log config.cache config.status
52 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
55 OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* all
57 OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* opt
59 OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* clean
61 OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* depend
63 $(MODULES:%=%.install):
64 cd $(@:%.install=%) && make install
65 export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
66 cp METAS/$(@:%.install=meta.helm-%.src) $$TARGET && \
67 echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
68 $(MODULES:%=%.uninstall):
69 cd $(@:%.uninstall=%) && make uninstall
70 rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
71 METAS/META.helm-%: METAS/meta.helm-%.src
72 cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
76 echo "digraph G {" > $@
77 echo " rankdir = TB ;" >> $@
78 for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
79 mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
84 echo "digraph G {" > $@
85 echo " rankdir = TB ;" >> $@
86 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
87 mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
88 for i in $(MODULES); do echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];" >> $@ ; done
93 .clustersdep.dot: .dep.dot
94 USE_CLUSTERS=yes ./patch_deps.sh $< $@
96 libraries.ps: .dep.dot
98 libraries-ext.ps: .extdep.dot
100 libraries-clusters.ps: .clustersdep.dot
102 libraries-complete.ps: .alldep.dot
105 ps: libraries.ps libraries-ext.ps libraries-clusters.ps