4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
40 METAS = $(MODULES:%=METAS/META.helm-%)
42 ifeq ($(DISTRIBUTED),no)
46 all: metas $(MODULES:%=rec@all@%)
47 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
49 ifeq ($(HAVE_OCAMLOPT),yes)
55 $(H)$(MAKE) -C syntax_extensions depend
56 $(H)$(MAKE) -C syntax_extensions
57 depend: syntax-extensions $(MODULES:%=rec@depend@%)
58 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
59 install-arch: $(MODULES:%=rec@install@%)
61 uninstall: $(MODULES:%=rec@uninstall@%)
62 clean: $(MODULES:%=rec@clean@%) clean_metas
64 .stats: $(MODULES:%=rec@.stats@%)
65 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
66 | sort -t : -k 2 -n -r > .stats
69 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
72 libraries-clusters.ps \
73 libraries-clusters.pdf \
81 distclean: clean clean_metas
83 $(H)rm -f configure config.log config.cache config.status
84 $(H)rm -f $(EXTRA_DIST_CLEAN)
86 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
88 METAS/META.helm-%: METAS/meta.helm-%.src
89 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
91 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
93 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
96 .dep.dot: $(SIMPLIFYDEPS)
97 $(H)echo "digraph G {" > $@
98 $(H)echo " rankdir = TB ;" >> $@
99 $(H)for i in $(MODULES); do \
100 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
102 sed "s/^helm-/ \"$$i\" -> \"/g" | \
103 sed "s/$$/\";/g" >> $@ ; \
105 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
110 $(H)echo "digraph G {" > $@
111 $(H)echo " rankdir = TB ;" >> $@
112 $(H)for i in $(MODULES); do \
113 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
115 sed "s/^pxp/pxp[-*]/g" | \
116 sed "s/^/ \"helm-$$i\" -> \"/g" | \
117 sed "s/$$/\";/g" >> $@ ; \
120 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
122 $(H)for i in $(MODULES); do \
123 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
128 .extdep.dot: .dep.dot
129 $(H)STATS/patch_deps.sh $< $@
130 .clustersdep.dot: .dep.dot
131 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
133 libraries.ps: .dep.dot
134 $(H)dot -Tps -o $@ $<
135 libraries-ext.ps: .extdep.dot
136 $(H)dot -Tps -o $@ $<
137 libraries-clusters.ps: .clustersdep.dot
138 $(H)dot -Tps -o $@ $<
139 libraries-complete.ps: .alldep.dot
140 $(H)dot -Tps -o $@ $<
142 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
149 metas: $(filter-out METAS/META.helm-binaries, $(METAS))