Bug 968642 - Port RCFILE and RESFILE to moz.build; r=gps

This commit is contained in:
Ehsan Akhgari 2014-02-07 23:22:31 -05:00
parent bd1e43cf13
commit e506f7f137
26 changed files with 59 additions and 20 deletions

View File

@ -82,7 +82,6 @@ endif
endif
ifeq ($(OS_ARCH),OS2)
RESFILE=splashos2.res
RCFLAGS += -DMOZ_PHOENIX
RCFLAGS += -DFIREFOX_ICO='"$(DIST)/branding/firefox-os2.ico"' -DDOCUMENT_ICO='"$(DIST)/branding/document-os2.ico"'
endif

View File

@ -7,8 +7,6 @@ LIB_IS_C_ONLY = 1
ifeq ($(OS_ARCH),WINNT)
DEFFILE = $(CURDIR)/sqlite-processed.def
RCFILE = sqlite.rc
RESFILE = sqlite.res
GARBAGE += \
sqlite-version.h \

View File

@ -66,3 +66,7 @@ if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
# disable PGO for Sun Studio
if CONFIG['SOLARIS_SUNPRO_CC']:
NO_PGO = True
if CONFIG['OS_ARCH'] == 'WINNT':
RCFILE = 'sqlite.rc'
RESFILE = 'sqlite.res'

View File

@ -12,3 +12,7 @@ FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
relative_path = '.'
include('testplugin.mozbuild')
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
RCFILE = 'nptest.rc'
RESFILE = 'nptest.res'

View File

@ -20,8 +20,6 @@ EXTRA_DSO_LDOPTS = \
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
RCFILE = nptest.rc
RESFILE = nptest.res
DEFFILE = $(win_srcdir)/nptest.def
OS_LIBS += $(call EXPAND_LIBNAME,msimg32)

View File

@ -27,8 +27,6 @@
#
# ***** END LICENSE BLOCK *****
RESFILE = winEmbed.res
LIBS = \
$(DEPTH)/profile/dirserviceprovider/standalone/$(LIB_PREFIX)profdirserviceprovidersa_s.$(LIB_SUFFIX) \
$(XPCOM_STANDALONE_GLUE_LDOPTS) \

View File

@ -15,3 +15,5 @@ SOURCES += [
XPI_NAME = 'winembed'
DEFINES['XPCOM_GLUE'] = True
RESFILE = 'winEmbed.res'

View File

@ -14,7 +14,6 @@ endif
# Target: 'libEGL'
# Links with: 'libGLESv2'
DEFFILE = $(srcdir)/libEGL.def
RCFILE = $(srcdir)/libEGL.rc
include $(topsrcdir)/config/rules.mk

View File

@ -42,3 +42,5 @@ if not CONFIG['MOZ_DEBUG']:
DEFINES['_SECURE_SCL'] = 0
DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'
RCFILE = SRCDIR + '/libEGL.rc'

View File

@ -11,7 +11,6 @@ OS_CPPFLAGS += -EHsc
endif
DEFFILE = $(srcdir)/libGLESv2.def
RCFILE = $(srcdir)/libGLESv2.rc
# End build_angle.gypi transcription.

View File

@ -193,3 +193,5 @@ if not CONFIG['MOZ_DEBUG']:
DEFINES['_SECURE_SCL'] = 0
DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'
RCFILE = SRCDIR + '/libGLESv2.rc'

View File

@ -222,11 +222,6 @@ else
NSPR_STATIC_PATH = $(DIST)/lib
endif
ifdef MOZ_ETW
# This will get the ETW provider resources into the library mozjs.dll
RESFILE = ETWProvider.res
endif
# HP-UX does not require the extra linking of "-lm"
ifeq (,$(filter HP-UX WINNT OS2,$(OS_ARCH)))
EXTRA_LIBS += -lm

View File

@ -409,6 +409,8 @@ if CONFIG['MOZ_ETW']:
GENERATED_FILES = [
'ETWProvider.h',
]
# This will get the ETW provider resources into the library mozjs.dll
RESFILE = 'ETWProvider.res'
if CONFIG['NIGHTLY_BUILD']:
DEFINES['ENABLE_PARALLEL_JS'] = True

View File

@ -236,6 +236,8 @@ class TreeMetadataEmitter(LoggingMixin):
'MSVC_ENABLE_PGO',
'NO_DIST_INSTALL',
'OS_LIBS',
'RCFILE',
'RESFILE',
'SDK_LIBRARY',
]
for v in varlist:

View File

@ -322,6 +322,18 @@ VARIABLES = {
This variable contains a list of system libaries to link against.
""", None),
'RCFILE': (unicode, unicode,
"""The program .rc file.
This variable can only be used on Windows (and OS/2).
""", None),
'RESFILE': (unicode, unicode,
"""The program .res file.
This variable can only be used on Windows (and OS/2).
""", None),
'SDK_LIBRARY': (StrictOrderingOnAppendList, list,
"""Elements of the distributed SDK.

View File

@ -35,3 +35,6 @@ MSVC_ENABLE_PGO = True
NO_VISIBILITY_FLAGS = True
DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
RCFILE = 'foo.rc'
RESFILE = 'bar.res'

View File

@ -328,6 +328,12 @@ class TestRecursiveMakeBackend(BackendTester):
'USE_DELAYIMP': [
'USE_DELAYIMP := 1',
],
'RCFILE': [
'RCFILE := foo.rc',
],
'RESFILE': [
'RESFILE := bar.res',
],
}
for var, val in expected.items():

View File

@ -41,3 +41,6 @@ IS_COMPONENT = True
NO_VISIBILITY_FLAGS = True
DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
RCFILE = 'foo.rc'
RESFILE = 'bar.res'

View File

@ -171,6 +171,8 @@ class TestEmitterBasic(unittest.TestCase):
VISIBILITY_FLAGS='',
DELAYLOAD_LDFLAGS=['-DELAYLOAD:foo.dll', '-DELAYLOAD:bar.dll'],
USE_DELAYIMP=True,
RCFILE='foo.rc',
RESFILE='bar.res',
)
variables = objs[0].variables

View File

@ -35,7 +35,6 @@ LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
endif
ifeq ($(OS_ARCH),OS2)
RESFILE = xulrunos2.res
RCFLAGS += -i $(topsrcdir)/widget/os2
LOCAL_INCLUDES += -I$(topsrcdir)/widget/os2

View File

@ -44,6 +44,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'os2', 'mac', 'cocoa',
'gtk2', 'gtk3', 'qt', 'android'):
DEFINES['ICON_DECODER'] = True
LOCAL_INCLUDES += [
'/config',
# need widget/windows for resource.h (included from widget.rc)
'/widget/windows',
]
if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
LOCAL_INCLUDES += [
'/xpcom/base',
]
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True

View File

@ -3,8 +3,6 @@
# 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/.
RESFILE = widget.res
include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)

View File

@ -36,3 +36,5 @@ LOCAL_INCLUDES += [
DEFINES['USE_OS2_TOOLKIT_HEADERS'] = True
DEFINES['MOZ_APP_DISPLAYNAME'] = '"%s"' % CONFIG['MOZ_APP_DISPLAYNAME']
RESFILE = 'widget.res'

View File

@ -3,8 +3,6 @@
# 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/.
RESFILE = widget.res
include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)

View File

@ -112,3 +112,5 @@ DEFINES['MOZ_UNICODE'] = True
for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'):
if CONFIG[var]:
DEFINES[var] = True
RESFILE = 'widget.res'

View File

@ -59,7 +59,6 @@ endif
endif
ifeq ($(OS_ARCH),OS2)
RESFILE=splashos2.res
RCFLAGS += -DMOZ_XULRUNNER
ifdef DEBUG
RCFLAGS += -DDEBUG