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/.
6 topsrcdir
= @top_srcdir@
10 include $(DEPTH
)/config
/autoconf.mk
12 MOZILLA_INTERNAL_API
= 1
15 include $(topsrcdir
)/config
/rules.mk
22 SPACE
= $(NULL
) $(NULL
)
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
)
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
35 for class in
`cat graphtypes.list`; do \
36 dot
-Tpng
-o
$${class}-graph.png
-Tcmapx
-o
$${class}-graph.map
$${class}-graph.gv
; \
39 for class in
`cat dumptypes.list`; do \
40 $(PYTHON
) $(srcdir)/fix-srcrefs.py
$(topsrcdir
) < $${class}.html
> $${class}-fixed.html
; \
45 for class in
`cat dumptypes.list`; do \
46 $(PYTHON
) $(srcdir)/MDC-upload.py
$${class}-fixed.html en
/$${class}; \
49 for class in
`cat graphtypes.list`; do \
50 $(PYTHON
) $(srcdir)/MDC-attach.py
$${class}-graph.png en
/$${class} "image/png" "Class inheritance graph"; \
53 GARBAGE
+= $(wildcard *.html
) $(wildcard *.png
) $(wildcard *.map
) \
54 $(wildcard *.gv
) classapi.out graphtypes.list dumptypes.list