4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
33 METAS = $(MODULES:%=METAS/META.helm-%)
35 ifeq ($(DISTRIBUTED),no)
39 all: metas $(MODULES:%=rec@all@%)
40 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
42 ifeq ($(HAVE_OCAMLOPT),yes)
48 $(H)$(MAKE) -C syntax_extensions depend
49 $(H)$(MAKE) -C syntax_extensions
50 depend: syntax-extensions $(MODULES:%=rec@depend@%)
51 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
52 install-arch: $(MODULES:%=rec@install@%)
54 uninstall: $(MODULES:%=rec@uninstall@%)
55 clean: $(MODULES:%=rec@clean@%) clean_metas
57 .stats: $(MODULES:%=rec@.stats@%)
58 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
59 | sort -t : -k 2 -n -r > .stats
62 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
65 libraries-clusters.ps \
66 libraries-clusters.pdf \
74 distclean: clean clean_metas
76 $(H)rm -f configure config.log config.cache config.status
77 $(H)rm -f $(EXTRA_DIST_CLEAN)
79 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
81 METAS/META.helm-%: METAS/meta.helm-%.src
82 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
84 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
86 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
89 .dep.dot: $(SIMPLIFYDEPS)
90 $(H)echo "digraph G {" > $@
91 $(H)echo " rankdir = TB ;" >> $@
92 $(H)for i in $(MODULES); do \
93 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
95 sed "s/^helm-/ \"$$i\" -> \"/g" | \
96 sed "s/$$/\";/g" >> $@ ; \
98 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
103 $(H)echo "digraph G {" > $@
104 $(H)echo " rankdir = TB ;" >> $@
105 $(H)for i in $(MODULES); do \
106 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
108 sed "s/^pxp/pxp[-*]/g" | \
109 sed "s/^/ \"helm-$$i\" -> \"/g" | \
110 sed "s/$$/\";/g" >> $@ ; \
113 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
115 $(H)for i in $(MODULES); do \
116 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
121 .extdep.dot: .dep.dot
122 $(H)STATS/patch_deps.sh $< $@
123 .clustersdep.dot: .dep.dot
124 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
126 libraries.ps: .dep.dot
127 $(H)dot -Tps -o $@ $<
128 libraries-ext.ps: .extdep.dot
129 $(H)dot -Tps -o $@ $<
130 libraries-clusters.ps: .clustersdep.dot
131 $(H)dot -Tps -o $@ $<
132 libraries-complete.ps: .alldep.dot
133 $(H)dot -Tps -o $@ $<
135 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
142 metas: $(filter-out METAS/META.helm-binaries, $(METAS))