Bug 563259: Fix shark/dtrace enabled combo. (r=me)
[mozilla-central.git] / xpcom / analysis / Makefile.in
blobe16c3285beb98811c0a1861774247dcbb19aba76
1 DEPTH = ../..
2 topsrcdir = @top_srcdir@
3 srcdir = @srcdir@
4 VPATH = @srcdir@
6 include $(DEPTH)/config/autoconf.mk
8 MOZILLA_INTERNAL_API = 1
9 NEED_MDDEPDIR = 1
11 include $(topsrcdir)/config/rules.mk
13 DUMP_CLASSES = \
14 nsAString_internal \
15 nsACString_internal \
16 $(NULL)
18 SPACE = $(NULL) $(NULL)
19 COMMA = ,
21 HGREV = $(shell hg -R $(topsrcdir) id -i)
23 classapi: DEHYDRA_MODULES = $(srcdir)/type-printer.js
24 classapi: TREEHYDRA_MODULES =
25 classapi: DEHYDRA_ARGS += --dump-types=$(subst $(SPACE),$(COMMA),$(strip $(DUMP_CLASSES))) --rev=$(HGREV)
26 classapi: $(MDDEPDIR)
27 $(CCC) $(OUTOPTION)/dev/null -c $(COMPILE_CXXFLAGS) $(srcdir)/type-printer.cpp >classapi.out 2>&1
28 perl -e 'while (<>) {if (/DUMP-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >dumptypes.list
29 perl -e 'while (<>) {if (/GRAPH-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >graphtypes.list
30 $(EXIT_ON_ERROR) \
31 for class in `cat graphtypes.list`; do \
32 dot -Tpng -o$${class}-graph.png -Tcmapx -o$${class}-graph.map $${class}-graph.gv; \
33 done
34 $(EXIT_ON_ERROR) \
35 for class in `cat dumptypes.list`; do \
36 $(PYTHON) $(srcdir)/fix-srcrefs.py $(topsrcdir) < $${class}.html > $${class}-fixed.html; \
37 done
39 upload_classapi:
40 $(EXIT_ON_ERROR) \
41 for class in `cat dumptypes.list`; do \
42 $(PYTHON) $(srcdir)/MDC-upload.py $${class}-fixed.html en/$${class}; \
43 done
44 $(EXIT_ON_ERROR) \
45 for class in `cat graphtypes.list`; do \
46 $(PYTHON) $(srcdir)/MDC-attach.py $${class}-graph.png en/$${class} "image/png" "Class inheritance graph"; \
47 done
49 GARBAGE += $(wildcard *.html) $(wildcard *.png) $(wildcard *.map) \
50 $(wildcard *.gv) classapi.out graphtypes.list dumptypes.list