4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
39 METAS = $(MODULES:%=METAS/META.helm-%)
41 ifeq ($(DISTRIBUTED),no)
45 all: metas $(MODULES:%=rec@all@%)
46 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
48 ifeq ($(HAVE_OCAMLOPT),yes)
54 $(H)$(MAKE) -C syntax_extensions depend
55 $(H)$(MAKE) -C syntax_extensions
56 depend: syntax-extensions $(MODULES:%=rec@depend@%)
57 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
58 install-arch: $(MODULES:%=rec@install@%)
60 uninstall: $(MODULES:%=rec@uninstall@%)
61 clean: $(MODULES:%=rec@clean@%) clean_metas
63 .stats: $(MODULES:%=rec@.stats@%)
64 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
65 | sort -t : -k 2 -n -r > .stats
68 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
71 libraries-clusters.ps \
72 libraries-clusters.pdf \
80 distclean: clean clean_metas
82 $(H)rm -f configure config.log config.cache config.status
83 $(H)rm -f $(EXTRA_DIST_CLEAN)
85 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
87 METAS/META.helm-%: METAS/meta.helm-%.src
88 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
90 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
92 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
95 .dep.dot: $(SIMPLIFYDEPS)
96 $(H)echo "digraph G {" > $@
97 $(H)echo " rankdir = TB ;" >> $@
98 $(H)for i in $(MODULES); do \
99 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
101 sed "s/^helm-/ \"$$i\" -> \"/g" | \
102 sed "s/$$/\";/g" >> $@ ; \
104 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
109 $(H)echo "digraph G {" > $@
110 $(H)echo " rankdir = TB ;" >> $@
111 $(H)for i in $(MODULES); do \
112 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
114 sed "s/^pxp/pxp[-*]/g" | \
115 sed "s/^/ \"helm-$$i\" -> \"/g" | \
116 sed "s/$$/\";/g" >> $@ ; \
119 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
121 $(H)for i in $(MODULES); do \
122 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
127 .extdep.dot: .dep.dot
128 $(H)STATS/patch_deps.sh $< $@
129 .clustersdep.dot: .dep.dot
130 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
132 libraries.ps: .dep.dot
133 $(H)dot -Tps -o $@ $<
134 libraries-ext.ps: .extdep.dot
135 $(H)dot -Tps -o $@ $<
136 libraries-clusters.ps: .clustersdep.dot
137 $(H)dot -Tps -o $@ $<
138 libraries-complete.ps: .alldep.dot
139 $(H)dot -Tps -o $@ $<
141 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
148 metas: $(filter-out METAS/META.helm-binaries, $(METAS))