4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
47 METAS = $(MODULES:%=METAS/META.helm-%)
49 ifeq ($(DISTRIBUTED),no)
53 all: metas $(MODULES:%=rec@all@%)
54 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
56 ifeq ($(HAVE_OCAMLOPT),yes)
62 $(H)$(MAKE) -C syntax_extensions depend
63 $(H)$(MAKE) -C syntax_extensions
64 depend: syntax-extensions $(MODULES:%=rec@depend@%)
65 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
66 install-arch: $(MODULES:%=rec@install@%)
68 uninstall: $(MODULES:%=rec@uninstall@%)
69 clean: $(MODULES:%=rec@clean@%) clean_metas
71 .stats: $(MODULES:%=rec@.stats@%)
72 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
73 | sort -t : -k 2 -n -r > .stats
76 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
79 libraries-clusters.ps \
80 libraries-clusters.pdf \
88 distclean: clean clean_metas
90 $(H)rm -f configure config.log config.cache config.status
91 $(H)rm -f $(EXTRA_DIST_CLEAN)
93 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
95 METAS/META.helm-%: METAS/meta.helm-%.src
96 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
98 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
100 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
103 .dep.dot: $(SIMPLIFYDEPS)
104 $(H)echo "digraph G {" > $@
105 $(H)echo " rankdir = TB ;" >> $@
106 $(H)for i in $(MODULES); do \
107 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
109 sed "s/^helm-/ \"$$i\" -> \"/g" | \
110 sed "s/$$/\";/g" >> $@ ; \
112 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
117 $(H)echo "digraph G {" > $@
118 $(H)echo " rankdir = TB ;" >> $@
119 $(H)for i in $(MODULES); do \
120 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
122 sed "s/^pxp/pxp[-*]/g" | \
123 sed "s/^/ \"helm-$$i\" -> \"/g" | \
124 sed "s/$$/\";/g" >> $@ ; \
127 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
129 $(H)for i in $(MODULES); do \
130 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
135 .extdep.dot: .dep.dot
136 $(H)STATS/patch_deps.sh $< $@
137 .clustersdep.dot: .dep.dot
138 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
140 libraries.ps: .dep.dot
141 $(H)dot -Tps -o $@ $<
142 libraries-ext.ps: .extdep.dot
143 $(H)dot -Tps -o $@ $<
144 libraries-clusters.ps: .clustersdep.dot
145 $(H)dot -Tps -o $@ $<
146 libraries-complete.ps: .alldep.dot
147 $(H)dot -Tps -o $@ $<
149 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
156 metas: $(filter-out METAS/META.helm-binaries, $(METAS))