4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
45 METAS = $(MODULES:%=METAS/META.helm-%)
47 ifeq ($(DISTRIBUTED),no)
51 all: metas $(MODULES:%=rec@all@%)
52 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
54 ifeq ($(HAVE_OCAMLOPT),yes)
60 $(H)$(MAKE) -C syntax_extensions depend
61 $(H)$(MAKE) -C syntax_extensions
62 depend: syntax-extensions $(MODULES:%=rec@depend@%)
63 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
64 install-arch: $(MODULES:%=rec@install@%)
66 uninstall: $(MODULES:%=rec@uninstall@%)
67 clean: $(MODULES:%=rec@clean@%) clean_metas
69 .stats: $(MODULES:%=rec@.stats@%)
70 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
71 | sort -t : -k 2 -n -r > .stats
74 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
77 libraries-clusters.ps \
78 libraries-clusters.pdf \
86 distclean: clean clean_metas
88 $(H)rm -f configure config.log config.cache config.status
89 $(H)rm -f $(EXTRA_DIST_CLEAN)
91 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
93 METAS/META.helm-%: METAS/meta.helm-%.src
94 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
96 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
98 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
101 .dep.dot: $(SIMPLIFYDEPS)
102 $(H)echo "digraph G {" > $@
103 $(H)echo " rankdir = TB ;" >> $@
104 $(H)for i in $(MODULES); do \
105 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
107 sed "s/^helm-/ \"$$i\" -> \"/g" | \
108 sed "s/$$/\";/g" >> $@ ; \
110 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
115 $(H)echo "digraph G {" > $@
116 $(H)echo " rankdir = TB ;" >> $@
117 $(H)for i in $(MODULES); do \
118 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
120 sed "s/^pxp/pxp[-*]/g" | \
121 sed "s/^/ \"helm-$$i\" -> \"/g" | \
122 sed "s/$$/\";/g" >> $@ ; \
125 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
127 $(H)for i in $(MODULES); do \
128 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
133 .extdep.dot: .dep.dot
134 $(H)STATS/patch_deps.sh $< $@
135 .clustersdep.dot: .dep.dot
136 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
138 libraries.ps: .dep.dot
139 $(H)dot -Tps -o $@ $<
140 libraries-ext.ps: .extdep.dot
141 $(H)dot -Tps -o $@ $<
142 libraries-clusters.ps: .clustersdep.dot
143 $(H)dot -Tps -o $@ $<
144 libraries-complete.ps: .alldep.dot
145 $(H)dot -Tps -o $@ $<
147 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
154 metas: $(filter-out METAS/META.helm-binaries, $(METAS))