4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
38 METAS = $(MODULES:%=METAS/META.helm-%)
40 ifeq ($(DISTRIBUTED),no)
44 all: metas $(MODULES:%=rec@all@%)
45 opt: metas $(MODULES:%=rec@opt@%)
47 ifeq ($(HAVE_OCAMLOPT),yes)
53 $(H)$(MAKE) -C syntax_extensions depend
54 $(H)$(MAKE) -C syntax_extensions
55 depend: syntax-extensions $(MODULES:%=rec@depend@%)
56 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
57 install: $(MODULES:%=rec@install@%)
58 uninstall: $(MODULES:%=rec@uninstall@%)
59 clean: $(MODULES:%=rec@clean@%) clean_metas
61 .stats: $(MODULES:%=rec@.stats@%)
62 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
63 | sort -t : -k 2 -n -r > .stats
66 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
69 libraries-clusters.ps \
70 libraries-clusters.pdf \
78 distclean: clean clean_metas
80 $(H)rm -f configure config.log config.cache config.status
81 $(H)rm -f $(EXTRA_DIST_CLEAN)
83 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
85 METAS/META.helm-%: METAS/meta.helm-%.src
86 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
88 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
90 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
93 .dep.dot: $(SIMPLIFYDEPS)
94 $(H)echo "digraph G {" > $@
95 $(H)echo " rankdir = TB ;" >> $@
96 $(H)for i in $(MODULES); do \
97 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
99 sed "s/^helm-/ \"$$i\" -> \"/g" | \
100 sed "s/$$/\";/g" >> $@ ; \
102 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
107 $(H)echo "digraph G {" > $@
108 $(H)echo " rankdir = TB ;" >> $@
109 $(H)for i in $(MODULES); do \
110 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
112 sed "s/^pxp/pxp[-*]/g" | \
113 sed "s/^/ \"helm-$$i\" -> \"/g" | \
114 sed "s/$$/\";/g" >> $@ ; \
117 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
119 $(H)for i in $(MODULES); do \
120 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
125 .extdep.dot: .dep.dot
126 $(H)STATS/patch_deps.sh $< $@
127 .clustersdep.dot: .dep.dot
128 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
130 libraries.ps: .dep.dot
131 $(H)dot -Tps -o $@ $<
132 libraries-ext.ps: .extdep.dot
133 $(H)dot -Tps -o $@ $<
134 libraries-clusters.ps: .clustersdep.dot
135 $(H)dot -Tps -o $@ $<
136 libraries-complete.ps: .alldep.dot
137 $(H)dot -Tps -o $@ $<
139 ps: libraries.ps libraries-ext.ps libraries-clusters.ps