xpcom/base/Makefile.in

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 #
     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 INSTALL_TARGETS += errorlist
     7 errorlist_FILES := \
     8   ErrorListCDefines.h \
     9   ErrorListCxxDefines.h \
    10   $(NULL)
    11 errorlist_DEST = $(DIST)/include
    12 errorlist_TARGET := export
    14 include $(topsrcdir)/config/rules.mk
    16 ifdef MOZ_WIDGET_GTK
    17 CXXFLAGS        += $(TK_CFLAGS)
    18 endif
    20 # We generate ErrorListCxxDefines.h from ErrorList.h using regex.  The -n option
    21 # suppresses printing the pattern space, and the p at the end prints it anyway,
    22 # so we don't print lines that don't match the pattern to start with.
    23 ErrorListCxxDefines.h: ErrorList.h Makefile
    24 	echo '// IWYU pragma: private, include "nsError.h"' > $@
    25 	sed -n 's/.*ERROR(\([A-Z_0-9]*\).*/#define \1 nsresult::\1/p' < $< >> $@
    27 ErrorListCDefines.h: ErrorList.h Makefile
    28 		sed 's/.*ERROR(\([A-Z_0-9]*\),\( *\)\(.*\))[^)]*/#define \1 \2((nsresult)(\3))/' < $< > $@
    30 GARBAGE += \
    31 	ErrorListCxxDefines.h \
    32 	ErrorListCDefines.h \
    33 	$(NULL)

mercurial