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 $(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: $(MODULES:%=rec@install@%)
59 uninstall: $(MODULES:%=rec@uninstall@%)
60 clean: $(MODULES:%=rec@clean@%) clean_metas
62 .stats: $(MODULES:%=rec@.stats@%)
63 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
64 | sort -t : -k 2 -n -r > .stats
67 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
70 libraries-clusters.ps \
71 libraries-clusters.pdf \
79 distclean: clean clean_metas
81 $(H)rm -f configure config.log config.cache config.status
82 $(H)rm -f $(EXTRA_DIST_CLEAN)
84 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
86 METAS/META.helm-%: METAS/meta.helm-%.src
87 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
89 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
91 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
94 .dep.dot: $(SIMPLIFYDEPS)
95 $(H)echo "digraph G {" > $@
96 $(H)echo " rankdir = TB ;" >> $@
97 $(H)for i in $(MODULES); do \
98 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
100 sed "s/^helm-/ \"$$i\" -> \"/g" | \
101 sed "s/$$/\";/g" >> $@ ; \
103 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
108 $(H)echo "digraph G {" > $@
109 $(H)echo " rankdir = TB ;" >> $@
110 $(H)for i in $(MODULES); do \
111 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
113 sed "s/^pxp/pxp[-*]/g" | \
114 sed "s/^/ \"helm-$$i\" -> \"/g" | \
115 sed "s/$$/\";/g" >> $@ ; \
118 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
120 $(H)for i in $(MODULES); do \
121 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
126 .extdep.dot: .dep.dot
127 $(H)STATS/patch_deps.sh $< $@
128 .clustersdep.dot: .dep.dot
129 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
131 libraries.ps: .dep.dot
132 $(H)dot -Tps -o $@ $<
133 libraries-ext.ps: .extdep.dot
134 $(H)dot -Tps -o $@ $<
135 libraries-clusters.ps: .clustersdep.dot
136 $(H)dot -Tps -o $@ $<
137 libraries-complete.ps: .alldep.dot
138 $(H)dot -Tps -o $@ $<
140 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
147 metas: $(filter-out METAS/META.helm-binaries, $(METAS))