Bug 976885 - Port RCFLAGS to moz.build; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 26 Feb 2014 09:12:49 -0500
changeset 171029 58053e39e2d4b5567836a9ab10b3cac9e3c1cc15
parent 171028 f6b60344ed5ff8dcb9ce908f785c7c7c56613c4e
child 171030 8aed2eaed137c5d5ab03a17bf3bd033048d2126e
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersglandium
bugs976885
milestone30.0a1
Bug 976885 - Port RCFLAGS to moz.build; r=glandium
browser/app/Makefile.in
browser/app/moz.build
toolkit/components/maintenanceservice/Makefile.in
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
@@ -56,21 +56,16 @@ 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
-ifndef GNU_CC
-RCFLAGS += -DMOZ_PHOENIX -I$(srcdir)
-else
-RCFLAGS += -DMOZ_PHOENIX --include-dir $(srcdir)
-endif
 endif
 
 PROGRAMS_DEST = $(DIST)/bin
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH),WINNT) #{
 #
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -32,8 +32,11 @@ LOCAL_INCLUDES += [
     '/xpcom/base',
     '/xpcom/build',
 ]
 
 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':
+    DEFINES['MOZ_PHOENIX'] = True
--- a/toolkit/components/maintenanceservice/Makefile.in
+++ b/toolkit/components/maintenanceservice/Makefile.in
@@ -14,21 +14,16 @@ 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 GNU_CC
-RCFLAGS += -I$(srcdir)
-else
-RCFLAGS += --include-dir $(srcdir)
-endif
 
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -17,22 +17,16 @@ 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)
-ifndef GNU_CC
-RCFLAGS += -I$(srcdir)
-else
-RCFLAGS += --include-dir $(srcdir)
-endif
-
 endif
 
 ifdef MOZ_WIDGET_GTK
 OS_CXXFLAGS += $(TK_CFLAGS)
 OS_LIBS += $(TK_LIBS)
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
@@ -74,16 +68,8 @@ libs::
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 EXTRA_LIBS += $(call EXPAND_LIBNAME,crypt32)
 EXTRA_LIBS += $(call EXPAND_LIBNAME,advapi32)
 endif
 
 CXXFLAGS += $(MOZ_BZ2_CFLAGS)
-
-ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL)))
-RCFLAGS += -DMAR_SIGNING_RELEASE_BETA=1
-else
-ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak,$(MOZ_UPDATE_CHANNEL)))
-RCFLAGS += -DMAR_SIGNING_AURORA_NIGHTLY=1
-endif
-endif
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -67,8 +67,13 @@ LOCAL_INCLUDES += [
 DELAYLOAD_DLLS += [
     'crypt32.dll',
     'userenv.dll',
     'wsock32.dll',
 ]
 
 if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
+
+if CONFIG['MOZ_UPDATE_CHANNEL'] in ('beta', 'release', 'esr'):
+    DEFINES['MAR_SIGNING_RELEASE_BETA'] = '1'
+elif CONFIG['MOZ_UPDATE_CHANNEL'] in ('nightly', 'aurora', 'nightly-elm', 'nightly-profiling', 'nightly-oak'):
+    DEFINES['MAR_SIGNING_AURORA_NIGHTLY'] = '1'
--- a/webapprt/win/Makefile.in
+++ b/webapprt/win/Makefile.in
@@ -26,24 +26,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
-ifndef GNU_CC
-RCFLAGS += -I$(srcdir)
-else
-RCFLAGS += --include-dir $(srcdir)
-endif
-ifdef DEBUG
-RCFLAGS += -DDEBUG
-endif
 
 # 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)
--- a/webapprt/win/moz.build
+++ b/webapprt/win/moz.build
@@ -6,16 +6,18 @@
 
 PROGRAM = 'webapprt-stub'
 
 SOURCES += [
     'webapprt.cpp',
 ]
 
 DEFINES['XPCOM_GLUE'] = True
+if CONFIG['DEBUG']:
+    DEFINES['DEBUG'] = True
 
 # Statically link against the CRT
 USE_STATIC_LIBS = True
 
 GENERATED_INCLUDES += ['/build']
 LOCAL_INCLUDES += [
     '/toolkit/xre',
     '/xpcom/base',
--- a/xulrunner/app/Makefile.in
+++ b/xulrunner/app/Makefile.in
@@ -30,24 +30,16 @@ endif
 # 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
-ifndef GNU_CC
-RCFLAGS += -DMOZ_XULRUNNER -I$(srcdir)
-else
-RCFLAGS += -DMOZ_XULRUNNER --include-dir $(srcdir)
-endif
-ifdef DEBUG
-RCFLAGS += -DDEBUG
-endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DXULRUNNER_ICO='"$(DIST)/branding/xulrunner.ico"' -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"'
 
 ifeq ($(OS_ARCH),WINNT)
 #
--- a/xulrunner/app/moz.build
+++ b/xulrunner/app/moz.build
@@ -9,16 +9,18 @@ DIRS += ['profile']
 PROGRAM = 'xulrunner'
 
 SOURCES += [
     'nsXULRunnerApp.cpp',
 ]
 
 DEFINES['XULRUNNER_PROGNAME'] = '"xulrunner"'
 DEFINES['XPCOM_GLUE'] = True
+if CONFIG['DEBUG']:
+    DEFINES['DEBUG'] = True
 
 if CONFIG['TARGET_XPCOM_ABI']:
     DEFINES['TARGET_XPCOM_ABI'] = '"%s"' % CONFIG['TARGET_XPCOM_ABI']
 
 LOCAL_INCLUDES += [
     '/toolkit/profile',
     '/toolkit/xre',
     '/xpcom/base',
--- a/xulrunner/stub/Makefile.in
+++ b/xulrunner/stub/Makefile.in
@@ -15,21 +15,16 @@ LIBS = \
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 LIBS            += \
 		$(TK_LIBS) \
 		$(NULL)
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 RCINCLUDE = xulrunner-stub.rc
-ifndef GNU_CC
-RCFLAGS += -DMOZ_XULRUNNER -I$(srcdir)
-else
-RCFLAGS += -DMOZ_XULRUNNER --include-dir $(srcdir)
-endif
 endif
 
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
--- a/xulrunner/stub/moz.build
+++ b/xulrunner/stub/moz.build
@@ -28,8 +28,11 @@ LOCAL_INCLUDES += [
 # Statically link against the RTL on windows
 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