Bug 959405 - Please update the Buri Moz-central, 1.3, 1.2 with the latest blobs from...
[gecko.git] / xpcom / base / Makefile.in
blob3b1e3118c10fb2750d6706349b3968cd008d3780
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 MOZILLA_INTERNAL_API =1
8 INSTALL_TARGETS += errorlist
9 errorlist_FILES := \
10 ErrorListCDefines.h \
11 ErrorListCxxDefines.h \
12 $(NULL)
13 errorlist_DEST = $(DIST)/include
14 errorlist_TARGET := export
16 include $(topsrcdir)/config/rules.mk
18 ifdef MOZ_WIDGET_GTK
19 CXXFLAGS += $(TK_CFLAGS)
20 endif
22 # We generate ErrorListCxxDefines.h from ErrorList.h using regex. The -n option
23 # suppresses printing the pattern space, and the p at the end prints it anyway,
24 # so we don't print lines that don't match the pattern to start with.
25 ErrorListCxxDefines.h: ErrorList.h Makefile
26 echo '// IWYU pragma: private, include "nsError.h"' > $@
27 sed -n 's/.*ERROR(\([A-Z_0-9]*\).*/#define \1 nsresult::\1/p' < $< >> $@
29 ErrorListCDefines.h: ErrorList.h Makefile
30 sed 's/.*ERROR(\([A-Z_0-9]*\),\( *\)\(.*\))[^)]*/#define \1 \2((nsresult)(\3))/' < $< > $@
32 GARBAGE += \
33 ErrorListCxxDefines.h \
34 ErrorListCDefines.h \
35 $(NULL)