4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
32 METAS = $(MODULES:%=METAS/META.helm-%)
34 ifeq ($(DISTRIBUTED),no)
38 all: metas $(MODULES:%=rec@all@%)
39 opt: metas syntax-extensions $(MODULES:%=rec@opt@%)
41 ifeq ($(HAVE_OCAMLOPT),yes)
47 $(H)$(MAKE) -C syntax_extensions depend
48 $(H)$(MAKE) -C syntax_extensions
49 depend: syntax-extensions $(MODULES:%=rec@depend@%)
50 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
51 install-arch: $(MODULES:%=rec@install@%)
53 uninstall: $(MODULES:%=rec@uninstall@%)
54 clean: $(MODULES:%=rec@clean@%) clean_metas
56 .stats: $(MODULES:%=rec@.stats@%)
57 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
58 | sort -t : -k 2 -n -r > .stats
61 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
64 libraries-clusters.ps \
65 libraries-clusters.pdf \
73 distclean: clean clean_metas
75 $(H)rm -f configure config.log config.cache config.status
76 $(H)rm -f $(EXTRA_DIST_CLEAN)
78 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
80 METAS/META.helm-%: METAS/meta.helm-%.src
81 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
83 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
85 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
88 .dep.dot: $(SIMPLIFYDEPS)
89 $(H)echo "digraph G {" > $@
90 $(H)echo " rankdir = TB ;" >> $@
91 $(H)for i in $(MODULES); do \
92 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
94 sed "s/^helm-/ \"$$i\" -> \"/g" | \
95 sed "s/$$/\";/g" >> $@ ; \
97 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
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/^pxp/pxp[-*]/g" | \
108 sed "s/^/ \"helm-$$i\" -> \"/g" | \
109 sed "s/$$/\";/g" >> $@ ; \
112 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
114 $(H)for i in $(MODULES); do \
115 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
120 .extdep.dot: .dep.dot
121 $(H)STATS/patch_deps.sh $< $@
122 .clustersdep.dot: .dep.dot
123 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
125 libraries.ps: .dep.dot
126 $(H)dot -Tps -o $@ $<
127 libraries-ext.ps: .extdep.dot
128 $(H)dot -Tps -o $@ $<
129 libraries-clusters.ps: .clustersdep.dot
130 $(H)dot -Tps -o $@ $<
131 libraries-complete.ps: .alldep.dot
132 $(H)dot -Tps -o $@ $<
134 ps: libraries.ps libraries-ext.ps libraries-clusters.ps
141 metas: $(filter-out METAS/META.helm-binaries, $(METAS))