4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
44 METAS = $(MODULES:%=METAS/META.helm-%)
46 ifeq ($(DISTRIBUTED),no)
50 all: metas $(MODULES:%=rec@all@%)
51 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
53 ifeq ($(HAVE_OCAMLOPT),yes)
59 $(H)$(MAKE) -C syntax_extensions depend
60 $(H)$(MAKE) -C syntax_extensions
61 depend: syntax-extensions $(MODULES:%=rec@depend@%)
62 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
63 install-arch: $(MODULES:%=rec@install@%)
65 uninstall: $(MODULES:%=rec@uninstall@%)
66 clean: $(MODULES:%=rec@clean@%) clean_metas
68 .stats: $(MODULES:%=rec@.stats@%)
69 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
70 | sort -t : -k 2 -n -r > .stats
73 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
76 libraries-clusters.ps \
77 libraries-clusters.pdf \
85 distclean: clean clean_metas
87 $(H)rm -f configure config.log config.cache config.status
88 $(H)rm -f $(EXTRA_DIST_CLEAN)
90 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
92 METAS/META.helm-%: METAS/meta.helm-%.src
93 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
95 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
97 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
100 .dep.dot: $(SIMPLIFYDEPS)
101 $(H)echo "digraph G {" > $@
102 $(H)echo " rankdir = TB ;" >> $@
103 $(H)for i in $(MODULES); do \
104 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
106 sed "s/^helm-/ \"$$i\" -> \"/g" | \
107 sed "s/$$/\";/g" >> $@ ; \
109 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
114 $(H)echo "digraph G {" > $@
115 $(H)echo " rankdir = TB ;" >> $@
116 $(H)for i in $(MODULES); do \
117 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
119 sed "s/^pxp/pxp[-*]/g" | \
120 sed "s/^/ \"helm-$$i\" -> \"/g" | \
121 sed "s/$$/\";/g" >> $@ ; \
124 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
126 $(H)for i in $(MODULES); do \
127 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
132 .extdep.dot: .dep.dot
133 $(H)STATS/patch_deps.sh $< $@
134 .clustersdep.dot: .dep.dot
135 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
137 libraries.ps: .dep.dot
138 $(H)dot -Tps -o $@ $<
139 libraries-ext.ps: .extdep.dot
140 $(H)dot -Tps -o $@ $<
141 libraries-clusters.ps: .clustersdep.dot
142 $(H)dot -Tps -o $@ $<
143 libraries-complete.ps: .alldep.dot
144 $(H)dot -Tps -o $@ $<
146 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
153 metas: $(filter-out METAS/META.helm-binaries, $(METAS))