1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/analysis/Makefile.in Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +include $(topsrcdir)/config/rules.mk 1.9 + 1.10 +DUMP_CLASSES = \ 1.11 + nsAString_internal \ 1.12 + nsACString_internal \ 1.13 + $(NULL) 1.14 + 1.15 +SPACE = $(NULL) $(NULL) 1.16 +COMMA = , 1.17 + 1.18 +HGREV = $(shell hg -R $(topsrcdir) id -i) 1.19 + 1.20 +classapi: DEHYDRA_MODULES = $(srcdir)/type-printer.js 1.21 +classapi: TREEHYDRA_MODULES = 1.22 +classapi: DEHYDRA_ARGS += --dump-types=$(subst $(SPACE),$(COMMA),$(strip $(DUMP_CLASSES))) --rev=$(HGREV) 1.23 +classapi: $(call mkdir_deps,$(MDDEPDIR)) 1.24 + $(CCC) $(OUTOPTION)/dev/null -c $(COMPILE_CXXFLAGS) $(srcdir)/type-printer.cpp >classapi.out 2>&1 1.25 + perl -e 'while (<>) {if (/DUMP-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >dumptypes.list 1.26 + perl -e 'while (<>) {if (/GRAPH-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >graphtypes.list 1.27 + $(EXIT_ON_ERROR) \ 1.28 + for class in `cat graphtypes.list`; do \ 1.29 + dot -Tpng -o$${class}-graph.png -Tcmapx -o$${class}-graph.map $${class}-graph.gv; \ 1.30 + done 1.31 + $(EXIT_ON_ERROR) \ 1.32 + for class in `cat dumptypes.list`; do \ 1.33 + $(PYTHON) $(srcdir)/fix-srcrefs.py $(topsrcdir) < $${class}.html > $${class}-fixed.html; \ 1.34 + done 1.35 + 1.36 +upload_classapi: 1.37 + $(EXIT_ON_ERROR) \ 1.38 + for class in `cat dumptypes.list`; do \ 1.39 + $(PYTHON) $(srcdir)/MDC-upload.py $${class}-fixed.html en/$${class}; \ 1.40 + done 1.41 + $(EXIT_ON_ERROR) \ 1.42 + for class in `cat graphtypes.list`; do \ 1.43 + $(PYTHON) $(srcdir)/MDC-attach.py $${class}-graph.png en/$${class} image/png 'Class inheritance graph'; \ 1.44 + done 1.45 + 1.46 +GARBAGE += $(wildcard *.html) $(wildcard *.png) $(wildcard *.map) \ 1.47 + $(wildcard *.gv) classapi.out graphtypes.list dumptypes.list