xpcom/base/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/base/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +#
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +INSTALL_TARGETS += errorlist
    1.10 +errorlist_FILES := \
    1.11 +  ErrorListCDefines.h \
    1.12 +  ErrorListCxxDefines.h \
    1.13 +  $(NULL)
    1.14 +errorlist_DEST = $(DIST)/include
    1.15 +errorlist_TARGET := export
    1.16 +
    1.17 +include $(topsrcdir)/config/rules.mk
    1.18 +
    1.19 +ifdef MOZ_WIDGET_GTK
    1.20 +CXXFLAGS        += $(TK_CFLAGS)
    1.21 +endif
    1.22 +
    1.23 +# We generate ErrorListCxxDefines.h from ErrorList.h using regex.  The -n option
    1.24 +# suppresses printing the pattern space, and the p at the end prints it anyway,
    1.25 +# so we don't print lines that don't match the pattern to start with.
    1.26 +ErrorListCxxDefines.h: ErrorList.h Makefile
    1.27 +	echo '// IWYU pragma: private, include "nsError.h"' > $@
    1.28 +	sed -n 's/.*ERROR(\([A-Z_0-9]*\).*/#define \1 nsresult::\1/p' < $< >> $@
    1.29 +
    1.30 +ErrorListCDefines.h: ErrorList.h Makefile
    1.31 +		sed 's/.*ERROR(\([A-Z_0-9]*\),\( *\)\(.*\))[^)]*/#define \1 \2((nsresult)(\3))/' < $< > $@
    1.32 +
    1.33 +GARBAGE += \
    1.34 +	ErrorListCxxDefines.h \
    1.35 +	ErrorListCDefines.h \
    1.36 +	$(NULL)

mercurial