4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
46 METAS = $(MODULES:%=METAS/META.helm-%)
48 ifeq ($(DISTRIBUTED),no)
52 all: metas $(MODULES:%=rec@all@%)
53 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
55 ifeq ($(HAVE_OCAMLOPT),yes)
61 $(H)$(MAKE) -C syntax_extensions depend
62 $(H)$(MAKE) -C syntax_extensions
63 depend: syntax-extensions $(MODULES:%=rec@depend@%)
64 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
65 install-arch: $(MODULES:%=rec@install@%)
67 uninstall: $(MODULES:%=rec@uninstall@%)
68 clean: $(MODULES:%=rec@clean@%) clean_metas
70 .stats: $(MODULES:%=rec@.stats@%)
71 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
72 | sort -t : -k 2 -n -r > .stats
75 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
78 libraries-clusters.ps \
79 libraries-clusters.pdf \
87 distclean: clean clean_metas
89 $(H)rm -f configure config.log config.cache config.status
90 $(H)rm -f $(EXTRA_DIST_CLEAN)
92 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
94 METAS/META.helm-%: METAS/meta.helm-%.src
95 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
97 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
99 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
102 .dep.dot: $(SIMPLIFYDEPS)
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/^helm-/ \"$$i\" -> \"/g" | \
109 sed "s/$$/\";/g" >> $@ ; \
111 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
116 $(H)echo "digraph G {" > $@
117 $(H)echo " rankdir = TB ;" >> $@
118 $(H)for i in $(MODULES); do \
119 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
121 sed "s/^pxp/pxp[-*]/g" | \
122 sed "s/^/ \"helm-$$i\" -> \"/g" | \
123 sed "s/$$/\";/g" >> $@ ; \
126 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
128 $(H)for i in $(MODULES); do \
129 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
134 .extdep.dot: .dep.dot
135 $(H)STATS/patch_deps.sh $< $@
136 .clustersdep.dot: .dep.dot
137 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
139 libraries.ps: .dep.dot
140 $(H)dot -Tps -o $@ $<
141 libraries-ext.ps: .extdep.dot
142 $(H)dot -Tps -o $@ $<
143 libraries-clusters.ps: .clustersdep.dot
144 $(H)dot -Tps -o $@ $<
145 libraries-complete.ps: .alldep.dot
146 $(H)dot -Tps -o $@ $<
148 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
155 metas: $(filter-out METAS/META.helm-binaries, $(METAS))