Bug 976886 - Port RCINCLUDE to moz.build; r=mshal
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 04 Mar 2014 17:19:24 -0500
changeset 171877 61ae64c9aa0b04612af26e5eade1fee55dbe16de
parent 171876 029a94d6088df43183e67e36a10a3bb3457d0827
child 171878 b5899e48b7fbefda79b6d6a06f8ace2ec3f1c5e9
push id26342
push usercbook@mozilla.com
push dateWed, 05 Mar 2014 12:04:59 +0000
treeherderautoland@7f7d0399102a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs976886
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 976886 - Port RCINCLUDE to moz.build; r=mshal
browser/app/Makefile.in
browser/app/moz.build
browser/metro/shell/commandexecutehandler/Makefile.in
browser/metro/shell/commandexecutehandler/moz.build
dom/plugins/ipc/hangui/Makefile.in
dom/plugins/ipc/hangui/moz.build
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
python/mozbuild/mozbuild/test/frontend/test_emitter.py
toolkit/components/maintenanceservice/Makefile.in
toolkit/components/maintenanceservice/moz.build
toolkit/crashreporter/client/Makefile.in
toolkit/crashreporter/client/moz.build
toolkit/library/Makefile.in
toolkit/library/moz.build
toolkit/mozapps/update/updater/Makefile.in
toolkit/mozapps/update/updater/moz.build
webapprt/win/Makefile.in
webapprt/win/moz.build
xulrunner/app/Makefile.in
xulrunner/app/moz.build
xulrunner/stub/Makefile.in
xulrunner/stub/moz.build
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -50,17 +50,16 @@ endif
 
 # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/config.mk
 
 ifeq ($(OS_ARCH),WINNT)
-RCINCLUDE = splash.rc
 # Rebuild firefox.exe if the manifest changes - it's included by splash.rc.
 # (this dependency should really be just for firefox.exe, not other targets)
 # Note the manifest file exists in the tree, so we use the explicit filename
 # here.
 EXTRA_DEPS += firefox.exe.manifest
 endif
 
 PROGRAMS_DEST = $(DIST)/bin
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -34,16 +34,17 @@ LOCAL_INCLUDES += [
 ]
 
 if CONFIG['_MSC_VER']:
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
+    RCINCLUDE = 'splash.rc'
     DEFINES['MOZ_PHOENIX'] = True
 
 # Control the default heap size.
 # This is the heap returned by GetProcessHeap().
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
--- a/browser/metro/shell/commandexecutehandler/Makefile.in
+++ b/browser/metro/shell/commandexecutehandler/Makefile.in
@@ -1,16 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include $(topsrcdir)/config/config.mk
 
 DIST_PROGRAM = CommandExecuteHandler$(BIN_SUFFIX)
-RCINCLUDE = CommandExecuteHandler.rc
 
 # Don't link against mozglue.dll
 MOZ_GLUE_LDFLAGS =
 MOZ_GLUE_PROGRAM_LDFLAGS =
 
 OS_LIBS = \
 	kernel32.lib \
 	user32.lib \
--- a/browser/metro/shell/commandexecutehandler/moz.build
+++ b/browser/metro/shell/commandexecutehandler/moz.build
@@ -13,8 +13,10 @@ SOURCES += [
 
 # We want this exe in dist/bin
 DIST_SUBDIR = ''
 
 for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM'):
     DEFINES[var] = True
 
 NO_PGO = True
+
+RCINCLUDE = 'CommandExecuteHandler.rc'
--- a/dom/plugins/ipc/hangui/Makefile.in
+++ b/dom/plugins/ipc/hangui/Makefile.in
@@ -1,15 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 OS_LIBS = $(call EXPAND_LIBNAME,comctl32)
 
-RCINCLUDE = HangUIDlg.rc
-
 STL_FLAGS = \
   -D_HAS_EXCEPTIONS=0 \
   $(NULL)
 
 MOZ_GLUE_LDFLAGS =
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/plugins/ipc/hangui/moz.build
+++ b/dom/plugins/ipc/hangui/moz.build
@@ -13,8 +13,10 @@ UNIFIED_SOURCES += [
     'PluginHangUIChild.cpp',
 ]
 include('/ipc/chromium/chromium-config.mozbuild')
 
 DEFINES['NS_NO_XPCOM'] = True
 
 if CONFIG['GNU_CC']:
     WIN32_EXE_LDFLAGS += ['-municode']
+
+RCINCLUDE = 'HangUIDlg.rc'
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -236,16 +236,17 @@ class TreeMetadataEmitter(LoggingMixin):
             'JS_MODULES_PATH',
             'LIBS',
             'LIBXUL_LIBRARY',
             'MSVC_ENABLE_PGO',
             'NO_DIST_INSTALL',
             'OS_LIBS',
             'RCFILE',
             'RESFILE',
+            'RCINCLUDE',
             'DEFFILE',
             'SDK_LIBRARY',
             'WIN32_EXE_LDFLAGS',
         ]
         for v in varlist:
             if v in sandbox and sandbox[v]:
                 passthru.variables[v] = sandbox[v]
 
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -344,16 +344,22 @@ VARIABLES = {
         """, None),
 
     'RESFILE': (unicode, unicode,
         """The program .res file.
 
         This variable can only be used on Windows.
         """, None),
 
+    'RCINCLUDE': (unicode, unicode,
+        """The resource script file to be included in the default .res file.
+
+        This variable can only be used on Windows.
+        """, None),
+
     'DEFFILE': (unicode, unicode,
         """The program .def (module definition) file.
 
         This variable can only be used on Windows.
         """, None),
 
     'RESOURCE_FILES': (HierarchicalStringListWithFlagsFactory({'preprocess': bool}), list,
         """List of resources to be exported, and in which subdirectories.
--- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
@@ -33,16 +33,17 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 MSVC_ENABLE_PGO = True
 NO_VISIBILITY_FLAGS = True
 
 DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
 
 RCFILE = 'foo.rc'
 RESFILE = 'bar.res'
+RCINCLUDE = 'bar.rc'
 DEFFILE = 'baz.def'
 
 USE_STATIC_LIBS = True
 
 CFLAGS += ['-fno-exceptions', '-w']
 CXXFLAGS += ['-fcxx-exceptions', '-include foo.h']
 LDFLAGS += ['-framework Foo', '-x']
 WIN32_EXE_LDFLAGS += ['-subsystem:console']
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -329,16 +329,19 @@ class TestRecursiveMakeBackend(BackendTe
                 'USE_DELAYIMP := 1',
             ],
             'RCFILE': [
                 'RCFILE := foo.rc',
             ],
             'RESFILE': [
                 'RESFILE := bar.res',
             ],
+            'RCINCLUDE': [
+                'RCINCLUDE := bar.rc',
+            ],
             'DEFFILE': [
                 'DEFFILE := baz.def',
             ],
             'USE_STATIC_LIBS': [
                 'USE_STATIC_LIBS := 1',
             ],
             'MOZBUILD_CFLAGS': [
                 'MOZBUILD_CFLAGS += -fno-exceptions',
--- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
@@ -39,16 +39,17 @@ FORCE_SHARED_LIB = True
 EXPORT_LIBRARY = True
 IS_COMPONENT = True
 NO_VISIBILITY_FLAGS = True
 
 DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
 
 RCFILE = 'foo.rc'
 RESFILE = 'bar.res'
+RCINCLUDE = 'bar.rc'
 DEFFILE = 'baz.def'
 
 USE_STATIC_LIBS = True
 
 CFLAGS += ['-fno-exceptions', '-w']
 CXXFLAGS += ['-fcxx-exceptions', '-include foo.h']
 LDFLAGS += ['-framework Foo', '-x']
 WIN32_EXE_LDFLAGS += ['-subsystem:console']
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -169,16 +169,17 @@ class TestEmitterBasic(unittest.TestCase
             OS_LIBS=['foo.so', '-l123', 'aaa.a'],
             SDK_LIBRARY=['fans.sdk', 'tans.sdk'],
             SSRCS=['bans.S', 'fans.S'],
             VISIBILITY_FLAGS='',
             DELAYLOAD_LDFLAGS=['-DELAYLOAD:foo.dll', '-DELAYLOAD:bar.dll'],
             USE_DELAYIMP=True,
             RCFILE='foo.rc',
             RESFILE='bar.res',
+            RCINCLUDE='bar.rc',
             DEFFILE='baz.def',
             USE_STATIC_LIBS=True,
             MOZBUILD_CFLAGS=['-fno-exceptions', '-w'],
             MOZBUILD_CXXFLAGS=['-fcxx-exceptions', '-include foo.h'],
             MOZBUILD_LDFLAGS=['-framework Foo', '-x'],
             WIN32_EXE_LDFLAGS=['-subsystem:console'],
         )
 
--- a/toolkit/components/maintenanceservice/Makefile.in
+++ b/toolkit/components/maintenanceservice/Makefile.in
@@ -11,18 +11,16 @@ MOZ_GLUE_PROGRAM_LDFLAGS =
 STL_FLAGS=
 
 ifeq ($(OS_ARCH),WINNT)
 LIBS += $(call EXPAND_LIBNAME_PATH,updatecommon-standalone,../../mozapps/update/common-standalone)
 else
 LIBS += $(call EXPAND_LIBNAME_PATH,updatecommon,../../mozapps/update/common)
 endif
 
-RCINCLUDE = maintenanceservice.rc
-
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 ws2_32 shell32)
 
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
--- a/toolkit/components/maintenanceservice/moz.build
+++ b/toolkit/components/maintenanceservice/moz.build
@@ -27,8 +27,10 @@ LOCAL_INCLUDES += [
     '/toolkit/mozapps/update/common',
     '/toolkit/xre',
 ]
 
 USE_STATIC_LIBS = True
 
 if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
+
+RCINCLUDE = 'maintenanceservice.rc'
--- a/toolkit/crashreporter/client/Makefile.in
+++ b/toolkit/crashreporter/client/Makefile.in
@@ -14,17 +14,16 @@ DIST_PROGRAM = crashreporter$(BIN_SUFFIX
 MOZ_GLUE_LDFLAGS =
 MOZ_GLUE_PROGRAM_LDFLAGS =
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
   $(NULL)
-RCINCLUDE = crashreporter.rc
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 shell32 wininet shlwapi)
 MOZ_WINCONSOLE = 0
 endif
 
 ifeq ($(OS_ARCH),Darwin)
 OS_LIBS += -framework Cocoa
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
--- a/toolkit/crashreporter/client/moz.build
+++ b/toolkit/crashreporter/client/moz.build
@@ -38,8 +38,9 @@ elif CONFIG['OS_ARCH'] == 'SunOS':
 
 if CONFIG['MOZ_ENABLE_GTK']:
     UNIFIED_SOURCES += [
         'crashreporter_gtk_common.cpp',
         'crashreporter_linux.cpp',
         'crashreporter_unix_common.cpp'
     ]
 
+RCINCLUDE = 'crashreporter.rc'
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -19,20 +19,16 @@ endif
 endif
 
 # COMPONENT_LIBS is mosly useless since bug 935881, but is kept for
 # MOZ_APP_COMPONENT_LIBS, used by comm-central, and gtest linking.
 SHARED_LIBRARY_LIBS += \
   $(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
   $(NULL)
 
-ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
-RCINCLUDE = xulrunner.rc
-endif
-
 # dependent libraries
 ifdef MOZ_B2G_BT_BLUEZ #{
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 OS_LIBS += -ldbus
 endif
 endif #}
 
 ifdef MOZ_B2G_CAMERA #{
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -11,19 +11,20 @@ SOURCES += [
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     SOURCES += [
         'nsDllMain.cpp',
     ]
     if not CONFIG['GNU_CC']:
         LOCAL_INCLUDES += [
-	    '/widget/windows',
-	    '/xpcom/base',
-	]
+            '/widget/windows',
+            '/xpcom/base',
+        ]
+        RCINCLUDE = 'xulrunner.rc'
 
 # component libraries
 additional_defines = (
     'MOZ_AUTH_EXTENSION',
     'MOZ_GIO_COMPONENT',
     'MOZ_JSDEBUGGER',
     'MOZ_PERMISSIONS',
     'MOZ_PREF_EXTENSIONS',
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -15,17 +15,16 @@ endif
 
 LIBS += \
   $(call EXPAND_LIBNAME_PATH,mar,$(DEPTH)/modules/libmar/src) \
   $(MOZ_BZ2_LIBS) \
   $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 LIBS += $(call EXPAND_LIBNAME_PATH,verifymar,$(DEPTH)/modules/libmar/verify)
-RCINCLUDE = updater.rc
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 ws2_32 shell32 shlwapi)
 endif
 
 ifdef MOZ_WIDGET_GTK
 OS_CXXFLAGS += $(TK_CFLAGS)
 OS_LIBS += $(TK_LIBS)
 endif
 
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -15,16 +15,17 @@ SOURCES += [
 have_progressui = 0
 if CONFIG['OS_ARCH'] == 'WINNT':
     have_progressui = 1
     SOURCES += [
         'loaddlls.cpp',
         'progressui_win.cpp',
         'win_dirent.cpp',
     ]
+    RCINCLUDE = 'updater.rc'
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
     USE_STATIC_LIBS = True
 
     # Pick up nsWindowsRestart.cpp
     LOCAL_INCLUDES += [
         '/toolkit/xre',
     ]
--- a/webapprt/win/Makefile.in
+++ b/webapprt/win/Makefile.in
@@ -25,18 +25,16 @@ include $(topsrcdir)/toolkit/mozapps/ins
 
 CONFIG_DIR = instgen
 SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx
 APP_VERSION := $(shell cat $(topsrcdir)/browser/config/version.txt)
 DEFINES += -DAPP_VERSION=$(APP_VERSION)
 
 OS_LIBS += $(call EXPAND_LIBNAME,shell32)
 
-RCINCLUDE = webapprt.rc
-
 # Uninstaller
 ifdef LOCALE_MERGEDIR
 PPL_LOCALE_ARGS = \
   --l10n-dir=$(LOCALE_MERGEDIR)/webapprt/webapp-uninstaller \
   --l10n-dir=$(call EXPAND_LOCALE_SRCDIR,webapprt/locales)/webapp-uninstaller \
   --l10n-dir=$(topsrcdir)/webapprt/locales/en-US/webapp-uninstaller \
   $(NULL)
 else
--- a/webapprt/win/moz.build
+++ b/webapprt/win/moz.build
@@ -34,8 +34,10 @@ if CONFIG['_MSC_VER']:
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
 #
 # Set it to 256k.  See bug 127069.
 if not CONFIG['GNU_CC']:
     LDFLAGS += ['/HEAP:0x40000']
+
+RCINCLUDE = 'webapprt.rc'
--- a/xulrunner/app/Makefile.in
+++ b/xulrunner/app/Makefile.in
@@ -29,17 +29,16 @@ endif
 # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/config.mk
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
-RCINCLUDE = splash.rc
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DXULRUNNER_ICO='"$(DIST)/branding/xulrunner.ico"' -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"'
 
 ifdef MOZ_WIDGET_GTK
 libs::
--- a/xulrunner/app/moz.build
+++ b/xulrunner/app/moz.build
@@ -37,8 +37,11 @@ if CONFIG['_MSC_VER']:
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
 #
 # Set it to 256k.  See bug 127069.
 if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
     LDFLAGS += ['/HEAP:0x40000']
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    RCINCLUDE = 'splash.rc'
--- a/xulrunner/stub/Makefile.in
+++ b/xulrunner/stub/Makefile.in
@@ -13,20 +13,16 @@ LIBS = \
 
 # Need to link with CoreFoundation on Mac
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 LIBS            += \
 		$(TK_LIBS) \
 		$(NULL)
 endif
 
-ifeq ($(OS_ARCH),WINNT)
-RCINCLUDE = xulrunner-stub.rc
-endif
-
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
--- a/xulrunner/stub/moz.build
+++ b/xulrunner/stub/moz.build
@@ -31,8 +31,9 @@ USE_STATIC_LIBS = True
 if CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += ['/toolkit/xre']
 
 if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DEFINES['MOZ_XULRUNNER'] = True
+    RCINCLUDE = 'xulrunner-stub.rc'