4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
49 METAS = $(MODULES:%=METAS/META.helm-%)
51 ifeq ($(DISTRIBUTED),no)
55 all: metas $(MODULES:%=rec@all@%)
56 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
58 ifeq ($(HAVE_OCAMLOPT),yes)
64 $(H)$(MAKE) -C syntax_extensions depend
65 $(H)$(MAKE) -C syntax_extensions
66 depend: syntax-extensions $(MODULES:%=rec@depend@%)
67 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
68 install-arch: $(MODULES:%=rec@install@%)
70 uninstall: $(MODULES:%=rec@uninstall@%)
71 clean: $(MODULES:%=rec@clean@%) clean_metas
73 .stats: $(MODULES:%=rec@.stats@%)
74 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
75 | sort -t : -k 2 -n -r > .stats
78 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
81 libraries-clusters.ps \
82 libraries-clusters.pdf \
90 distclean: clean clean_metas
92 $(H)rm -f configure config.log config.cache config.status
93 $(H)rm -f $(EXTRA_DIST_CLEAN)
95 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
97 METAS/META.helm-%: METAS/meta.helm-%.src
98 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
100 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
102 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
105 .dep.dot: $(SIMPLIFYDEPS)
106 $(H)echo "digraph G {" > $@
107 $(H)echo " rankdir = TB ;" >> $@
108 $(H)for i in $(MODULES); do \
109 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
111 sed "s/^helm-/ \"$$i\" -> \"/g" | \
112 sed "s/$$/\";/g" >> $@ ; \
114 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
119 $(H)echo "digraph G {" > $@
120 $(H)echo " rankdir = TB ;" >> $@
121 $(H)for i in $(MODULES); do \
122 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
124 sed "s/^pxp/pxp[-*]/g" | \
125 sed "s/^/ \"helm-$$i\" -> \"/g" | \
126 sed "s/$$/\";/g" >> $@ ; \
129 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
131 $(H)for i in $(MODULES); do \
132 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
137 .extdep.dot: .dep.dot
138 $(H)STATS/patch_deps.sh $< $@
139 .clustersdep.dot: .dep.dot
140 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
142 libraries.ps: .dep.dot
143 $(H)dot -Tps -o $@ $<
144 libraries-ext.ps: .extdep.dot
145 $(H)dot -Tps -o $@ $<
146 libraries-clusters.ps: .clustersdep.dot
147 $(H)dot -Tps -o $@ $<
148 libraries-complete.ps: .alldep.dot
149 $(H)dot -Tps -o $@ $<
151 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
158 metas: $(filter-out METAS/META.helm-binaries, $(METAS))