4 include ../Makefile.defs
6 # Warning: the modules must be in compilation order
37 METAS = $(MODULES:%=METAS/META.helm-%)
39 ifeq ($(DISTRIBUTED),no)
43 all: metas $(MODULES:%=rec@all@%)
44 opt: metas $(MODULES:%=rec@opt@%)
46 ifeq ($(HAVE_OCAMLOPT),yes)
52 $(H)$(MAKE) -C utf8_macros depend
53 $(H)$(MAKE) -C utf8_macros pa_unicode_macro.cma
54 depend: syntax-extensions $(MODULES:%=rec@depend@%)
55 depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
56 install: $(MODULES:%=rec@install@%)
57 uninstall: $(MODULES:%=rec@uninstall@%)
58 clean: $(MODULES:%=rec@clean@%) clean_metas
60 .stats: $(MODULES:%=rec@.stats@%)
61 $(H)(for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
62 | sort -t : -k 2 -n -r > .stats
65 $(H)$(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
68 libraries-clusters.ps \
69 libraries-clusters.pdf \
77 distclean: clean clean_metas
79 $(H)rm -f configure config.log config.cache config.status
80 $(H)rm -f $(EXTRA_DIST_CLEAN)
82 .PHONY: all opt world metas depend install uninstall clean clean_metas distclean
84 METAS/META.helm-%: METAS/meta.helm-%.src
85 $(H)cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
87 SIMPLIFYDEPS = ../daemons/graphs/tools/simplify_deps/simplify_deps
89 $(H)$(MAKE) -C $(dir $(SIMPLIFYDEPS))
92 .dep.dot: $(SIMPLIFYDEPS)
93 $(H)echo "digraph G {" > $@
94 $(H)echo " rankdir = TB ;" >> $@
95 $(H)for i in $(MODULES); do \
96 $(OCAMLFIND) query helm-$$i -recursive -p-format | \
98 sed "s/^helm-/ \"$$i\" -> \"/g" | \
99 sed "s/$$/\";/g" >> $@ ; \
101 $(H)mv $@ $@.old ; $(SIMPLIFYDEPS) < $@.old > $@ ; rm $@.old
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/^pxp/pxp[-*]/g" | \
112 sed "s/^/ \"helm-$$i\" -> \"/g" | \
113 sed "s/$$/\";/g" >> $@ ; \
116 ./simplify_deps/simplify_deps.opt < $@.old > $@ ; \
118 $(H)for i in $(MODULES); do \
119 echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];"\
124 .extdep.dot: .dep.dot
125 $(H)STATS/patch_deps.sh $< $@
126 .clustersdep.dot: .dep.dot
127 $(H)USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
129 libraries.ps: .dep.dot
130 $(H)dot -Tps -o $@ $<
131 libraries-ext.ps: .extdep.dot
132 $(H)dot -Tps -o $@ $<
133 libraries-clusters.ps: .clustersdep.dot
134 $(H)dot -Tps -o $@ $<
135 libraries-complete.ps: .alldep.dot
136 $(H)dot -Tps -o $@ $<
138 ps: libraries.ps libraries-ext.ps libraries-clusters.ps