Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | include $(topsrcdir)/config/rules.mk |
michael@0 | 6 | |
michael@0 | 7 | DUMP_CLASSES = \ |
michael@0 | 8 | nsAString_internal \ |
michael@0 | 9 | nsACString_internal \ |
michael@0 | 10 | $(NULL) |
michael@0 | 11 | |
michael@0 | 12 | SPACE = $(NULL) $(NULL) |
michael@0 | 13 | COMMA = , |
michael@0 | 14 | |
michael@0 | 15 | HGREV = $(shell hg -R $(topsrcdir) id -i) |
michael@0 | 16 | |
michael@0 | 17 | classapi: DEHYDRA_MODULES = $(srcdir)/type-printer.js |
michael@0 | 18 | classapi: TREEHYDRA_MODULES = |
michael@0 | 19 | classapi: DEHYDRA_ARGS += --dump-types=$(subst $(SPACE),$(COMMA),$(strip $(DUMP_CLASSES))) --rev=$(HGREV) |
michael@0 | 20 | classapi: $(call mkdir_deps,$(MDDEPDIR)) |
michael@0 | 21 | $(CCC) $(OUTOPTION)/dev/null -c $(COMPILE_CXXFLAGS) $(srcdir)/type-printer.cpp >classapi.out 2>&1 |
michael@0 | 22 | perl -e 'while (<>) {if (/DUMP-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >dumptypes.list |
michael@0 | 23 | perl -e 'while (<>) {if (/GRAPH-TYPE\((.*)\)/) {print "$$1 ";}}' <classapi.out >graphtypes.list |
michael@0 | 24 | $(EXIT_ON_ERROR) \ |
michael@0 | 25 | for class in `cat graphtypes.list`; do \ |
michael@0 | 26 | dot -Tpng -o$${class}-graph.png -Tcmapx -o$${class}-graph.map $${class}-graph.gv; \ |
michael@0 | 27 | done |
michael@0 | 28 | $(EXIT_ON_ERROR) \ |
michael@0 | 29 | for class in `cat dumptypes.list`; do \ |
michael@0 | 30 | $(PYTHON) $(srcdir)/fix-srcrefs.py $(topsrcdir) < $${class}.html > $${class}-fixed.html; \ |
michael@0 | 31 | done |
michael@0 | 32 | |
michael@0 | 33 | upload_classapi: |
michael@0 | 34 | $(EXIT_ON_ERROR) \ |
michael@0 | 35 | for class in `cat dumptypes.list`; do \ |
michael@0 | 36 | $(PYTHON) $(srcdir)/MDC-upload.py $${class}-fixed.html en/$${class}; \ |
michael@0 | 37 | done |
michael@0 | 38 | $(EXIT_ON_ERROR) \ |
michael@0 | 39 | for class in `cat graphtypes.list`; do \ |
michael@0 | 40 | $(PYTHON) $(srcdir)/MDC-attach.py $${class}-graph.png en/$${class} image/png 'Class inheritance graph'; \ |
michael@0 | 41 | done |
michael@0 | 42 | |
michael@0 | 43 | GARBAGE += $(wildcard *.html) $(wildcard *.png) $(wildcard *.map) \ |
michael@0 | 44 | $(wildcard *.gv) classapi.out graphtypes.list dumptypes.list |