Bug 783551 - Get tooltool running on the b2g on OS X builds. r=respindola
[gecko.git] / xpcom / analysis / Makefile.in
blob784424dd826c2411e511e6fc1efdec6d5281315f
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 DEPTH = @DEPTH@
6 topsrcdir = @top_srcdir@
7 srcdir = @srcdir@
8 VPATH = @srcdir@
10 include $(DEPTH)/config/autoconf.mk
12 MOZILLA_INTERNAL_API = 1
13 NEED_MDDEPDIR = 1
15 include $(topsrcdir)/config/rules.mk
17 DUMP_CLASSES = \
18 nsAString_internal \
19 nsACString_internal \
20 $(NULL)
22 SPACE = $(NULL) $(NULL)
23 COMMA = ,
25 HGREV = $(shell hg -R $(topsrcdir) id -i)
27 classapi: DEHYDRA_MODULES = $(srcdir)/type-printer.js
28 classapi: TREEHYDRA_MODULES =
29 classapi: DEHYDRA_ARGS += --dump-types=$(subst $(SPACE),$(COMMA),$(strip $(DUMP_CLASSES))) --rev=$(HGREV)
30 classapi: $(MDDEPDIR)
31 $(CCC) $(OUTOPTION)/dev/null -c $(COMPILE_CXXFLAGS) $(srcdir)/type-printer.cpp >classapi.out 2>&1
32 perl -e 'while (<>) {if (/DUMP-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >dumptypes.list
33 perl -e 'while (<>) {if (/GRAPH-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >graphtypes.list
34 $(EXIT_ON_ERROR) \
35 for class in `cat graphtypes.list`; do \
36 dot -Tpng -o$${class}-graph.png -Tcmapx -o$${class}-graph.map $${class}-graph.gv; \
37 done
38 $(EXIT_ON_ERROR) \
39 for class in `cat dumptypes.list`; do \
40 $(PYTHON) $(srcdir)/fix-srcrefs.py $(topsrcdir) < $${class}.html > $${class}-fixed.html; \
41 done
43 upload_classapi:
44 $(EXIT_ON_ERROR) \
45 for class in `cat dumptypes.list`; do \
46 $(PYTHON) $(srcdir)/MDC-upload.py $${class}-fixed.html en/$${class}; \
47 done
48 $(EXIT_ON_ERROR) \
49 for class in `cat graphtypes.list`; do \
50 $(PYTHON) $(srcdir)/MDC-attach.py $${class}-graph.png en/$${class} "image/png" "Class inheritance graph"; \
51 done
53 GARBAGE += $(wildcard *.html) $(wildcard *.png) $(wildcard *.map) \
54 $(wildcard *.gv) classapi.out graphtypes.list dumptypes.list