Bug 772828 - Part b: use RESOURCE_FILES in moz.build instead of manual rules in Makefile.in; r=mshal
authorBrian O'Keefe <bokeefe@alum.wpi.edu>
Tue, 05 Nov 2013 13:37:54 -0500
changeset 168079 8bc655300999
parent 168078 c9450b0ced26
child 168080 1ffc31314d2d
push id26195
push userryanvm@gmail.com
push date2014-02-11 19:45 +0000
treeherdermozilla-central@e93b626422f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs772828
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 772828 - Part b: use RESOURCE_FILES in moz.build instead of manual rules in Makefile.in; r=mshal
content/xml/content/src/Makefile.in
content/xml/content/src/moz.build
editor/composer/src/Makefile.in
editor/composer/src/moz.build
intl/locale/src/Makefile.in
intl/locale/src/moz.build
intl/unicharutil/tables/Makefile.in
intl/unicharutil/tables/moz.build
layout/generic/Makefile.in
layout/generic/moz.build
layout/mathml/Makefile.in
layout/mathml/moz.build
layout/style/Makefile.in
layout/style/moz.build
layout/svg/Makefile.in
layout/svg/moz.build
mobile/android/fonts/Makefile.in
mobile/android/fonts/moz.build
netwerk/test/Makefile.in
netwerk/test/moz.build
rdf/tests/dsds/Makefile.in
rdf/tests/dsds/moz.build
tools/trace-malloc/Makefile.in
tools/trace-malloc/moz.build
widget/cocoa/Makefile.in
widget/cocoa/moz.build
xpcom/sample/Makefile.in
xpcom/sample/moz.build
xpcom/tests/Makefile.in
xpcom/tests/moz.build
deleted file mode 100644
--- a/content/xml/content/src/Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# 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/rules.mk
-
-EXPORT_RESOURCE_CONTENT = \
-		$(srcdir)/htmlmathml-f.ent \
-		$(NULL)
-libs::
-	$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/res/dtd
--- a/content/xml/content/src/moz.build
+++ b/content/xml/content/src/moz.build
@@ -22,8 +22,11 @@ FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'gklayout'
 LOCAL_INCLUDES += [
     '/content/base/src',
 ]
 
+RESOURCE_FILES.dtd += [
+    'htmlmathml-f.ent',
+]
deleted file mode 100644
--- a/editor/composer/src/Makefile.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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/rules.mk
-
-_FILES = \
-	$(srcdir)/res/EditorOverride.css \
-	$(srcdir)/res/grabber.gif \
-	$(srcdir)/res/table-add-column-after-active.gif \
-	$(srcdir)/res/table-add-column-after-hover.gif \
-	$(srcdir)/res/table-add-column-after.gif \
-	$(srcdir)/res/table-add-column-before-active.gif \
-	$(srcdir)/res/table-add-column-before-hover.gif \
-	$(srcdir)/res/table-add-column-before.gif \
-	$(srcdir)/res/table-add-row-after-active.gif \
-	$(srcdir)/res/table-add-row-after-hover.gif \
-	$(srcdir)/res/table-add-row-after.gif \
-	$(srcdir)/res/table-add-row-before-active.gif \
-	$(srcdir)/res/table-add-row-before-hover.gif \
-	$(srcdir)/res/table-add-row-before.gif \
-	$(srcdir)/res/table-remove-column-active.gif \
-	$(srcdir)/res/table-remove-column-hover.gif \
-	$(srcdir)/res/table-remove-column.gif \
-	$(srcdir)/res/table-remove-row-active.gif \
-	$(srcdir)/res/table-remove-row-hover.gif \
-	$(srcdir)/res/table-remove-row.gif \
-	$(NULL)
-
-libs::
-	$(INSTALL) $(_FILES) $(DIST)/bin/res
--- a/editor/composer/src/moz.build
+++ b/editor/composer/src/moz.build
@@ -13,8 +13,30 @@ UNIFIED_SOURCES += [
     'nsComposeTxtSrvFilter.cpp',
     'nsEditingSession.cpp',
     'nsEditorSpellCheck.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
+RESOURCE_FILES += [
+    'res/EditorOverride.css',
+    'res/grabber.gif',
+    'res/table-add-column-after-active.gif',
+    'res/table-add-column-after-hover.gif',
+    'res/table-add-column-after.gif',
+    'res/table-add-column-before-active.gif',
+    'res/table-add-column-before-hover.gif',
+    'res/table-add-column-before.gif',
+    'res/table-add-row-after-active.gif',
+    'res/table-add-row-after-hover.gif',
+    'res/table-add-row-after.gif',
+    'res/table-add-row-before-active.gif',
+    'res/table-add-row-before-hover.gif',
+    'res/table-add-row-before.gif',
+    'res/table-remove-column-active.gif',
+    'res/table-remove-column-hover.gif',
+    'res/table-remove-column.gif',
+    'res/table-remove-row-active.gif',
+    'res/table-remove-row-hover.gif',
+    'res/table-remove-row.gif',
+]
--- a/intl/locale/src/Makefile.in
+++ b/intl/locale/src/Makefile.in
@@ -2,21 +2,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/.
 
 ifeq ($(MOZ_WIDGET_TOOLKIT), qt)
 OS_INCLUDES	+= $(MOZ_QT_CFLAGS)
 endif
 
-EXPORT_RESOURCE = \
-		$(srcdir)/langGroups.properties \
-		$(srcdir)/language.properties \
-		$(NULL)
-
-
 include $(topsrcdir)/config/rules.mk
 
 charsetalias.properties.h: props2arrays.py charsetalias.properties
 	$(PYTHON) $^ $@
 
-libs::
-	$(INSTALL) $(EXPORT_RESOURCE) $(DIST)/bin/res
--- a/intl/locale/src/moz.build
+++ b/intl/locale/src/moz.build
@@ -37,8 +37,13 @@ FINAL_LIBRARY = 'i18n'
 
 GENERATED_FILES = [
     'charsetalias.properties.h',
 ]
 
 LOCAL_INCLUDES += [
     '/intl/uconv/src',
 ]
+
+RESOURCE_FILES += [
+    'langGroups.properties',
+    'language.properties',
+]
--- a/intl/unicharutil/tables/Makefile.in
+++ b/intl/unicharutil/tables/Makefile.in
@@ -1,23 +1,11 @@
 #
 # 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/rules.mk
 
-_PROP_TABLES = \
-	htmlEntityVersions.properties \
-	html40Latin1.properties \
-	html40Symbols.properties \
-	html40Special.properties \
-	transliterate.properties \
-	mathml20.properties \
-	$(NULL)
-
 ifeq ($(MOZ_WIDGET_TOOLKIT), qt)
 CFLAGS          += $(MOZ_QT_CFLAGS)
 CXXFLAGS        += $(MOZ_QT_CFLAGS)
 endif
-
-libs:: $(_PROP_TABLES)
-	$(INSTALL) $^ $(DIST)/bin/res/entityTables
--- a/intl/unicharutil/tables/moz.build
+++ b/intl/unicharutil/tables/moz.build
@@ -1,6 +1,14 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+RESOURCE_FILES.entityTables = [
+    'htmlEntityVersions.properties',
+    'html40Latin1.properties',
+    'html40Symbols.properties',
+    'html40Special.properties',
+    'mathml20.properties',
+    'transliterate.properties',
+]
--- a/layout/generic/Makefile.in
+++ b/layout/generic/Makefile.in
@@ -1,24 +1,17 @@
 # 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/.
 
-RESOURCES_HTML = \
-		$(srcdir)/folder.png \
-		$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += \
 		$(MOZ_CAIRO_CFLAGS) \
 		$(NULL)
 
 ifdef MOZ_WIDGET_GTK
 CXXFLAGS += $(TK_CFLAGS)
 endif
 
 ifdef MOZ_ENABLE_QT
 CXXFLAGS += $(MOZ_QT_CFLAGS)
 endif
-
-libs::
-	$(INSTALL) $(RESOURCES_HTML) $(DIST)/bin/res/html
--- a/layout/generic/moz.build
+++ b/layout/generic/moz.build
@@ -122,8 +122,12 @@ LOCAL_INCLUDES += [
     '../forms',
     '../style',
     '../svg',
     '../tables',
     '../xul',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+RESOURCE_FILES.html = [
+    'folder.png',
+]
deleted file mode 100644
--- a/layout/mathml/Makefile.in
+++ /dev/null
@@ -1,35 +0,0 @@
-#!gmake
-#
-# 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/rules.mk
-
-font_properties = \
-	mathfontMathJax_Main.properties \
-	mathfontUnicode.properties \
-	mathfontSTIXNonUnicode.properties \
-	mathfontSTIXSize1.properties \
-	mathfontSTIXSizeOneSym.properties \
-	mathfontAsanaMath.properties \
-	mathfontStandardSymbolsL.properties \
-	$(NULL)
-
-ifeq ($(TARGET_MD_ARCH),win32)
-font_properties += \
-	mathfontSymbol.properties
-endif
-
-libs:: $(font_properties)
-	$(INSTALL) $^ $(DIST)/bin/res/fonts
-
-math_properties = mathfont.properties
-
-$(DIST)/bin/res/fonts/$(math_properties) $(DESTDIR)$(mozappdir)/res/fonts/$(math_properties): $(math_properties) Makefile
-	test -d $(@D) || $(NSINSTALL) -D $(@D)
-	rm -f $@
-	$(call py_action,preprocessor,--marker=% $(DEFINES) $(ACDEFINES) $< -o $@)
-
-libs:: $(DIST)/bin/res/fonts/$(math_properties)
-install:: $(DESTDIR)$(mozappdir)/res/fonts/$(math_properties)
--- a/layout/mathml/moz.build
+++ b/layout/mathml/moz.build
@@ -46,9 +46,27 @@ LOCAL_INCLUDES += [
     '/content/mathml/content/src',
 ]
 
 if CONFIG['ENABLE_TESTS']:
     PARALLEL_DIRS += [
         'tests',
     ]
 
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
+JAR_MANIFESTS += ['jar.mn']
+
+RESOURCE_FILES.fonts += [
+    'mathfont.properties',
+    'mathfontAsanaMath.properties',
+    'mathfontMathJax_Main.properties',
+    'mathfontStandardSymbolsL.properties',
+    'mathfontSTIXNonUnicode.properties',
+    'mathfontSTIXSize1.properties',
+    'mathfontSTIXSizeOneSym.properties',
+    'mathfontUnicode.properties',
+]
+
+RESOURCE_FILES.fonts['mathfont.properties'].preprocess = True
+
+if CONFIG['TARGET_MD_ARCH'] == 'win32':
+    RESOURCE_FILES.fonts += [
+        'mathfontSymbol.properties',
+    ]
--- a/layout/style/Makefile.in
+++ b/layout/style/Makefile.in
@@ -12,23 +12,11 @@ structlist_FILES := nsStyleStructList.h
 structlist_DEST = $(DIST)/include
 structlist_TARGET := export
 
 include $(topsrcdir)/config/rules.mk
 
 nsStyleStructList.h : $(srcdir)/generate-stylestructlist.py
 	$(PYTHON) $< > $@
 
-_FILES	= \
-	contenteditable.css \
-	designmode.css \
-	ImageDocument.css \
-	TopLevelImageDocument.css \
-	TopLevelVideoDocument.css \
-	$(NULL)
-
 GARBAGE	+= \
-	$(addprefix $(DIST)/bin/res/,$(_FILES)) \
 	nsStyleStructList.h \
 	$(NULL)
-
-libs:: $(_FILES)
-	$(INSTALL) $^ $(DIST)/bin/res
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -151,8 +151,16 @@ LOCAL_INCLUDES += [
     '../base',
     '../generic',
     '../xul',
     '/dom/base',
     '/dom/xbl',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+RESOURCE_FILES += [
+    'contenteditable.css',
+    'designmode.css',
+    'ImageDocument.css',
+    'TopLevelImageDocument.css',
+    'TopLevelVideoDocument.css',
+]
--- a/layout/svg/Makefile.in
+++ b/layout/svg/Makefile.in
@@ -1,9 +0,0 @@
-#
-# 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/rules.mk
-
-libs::
-	$(INSTALL) $(srcdir)/svg.css $(DIST)/bin/res
--- a/layout/svg/moz.build
+++ b/layout/svg/moz.build
@@ -53,8 +53,12 @@ LOCAL_INCLUDES += [
     '../../content/svg/content/src',
     '../../widget',
     '../base',
     '../generic',
     '../style',
     '../xul',
 ]
 
+RESOURCE_FILES += [
+    'svg.css',
+]
+
--- a/mobile/android/fonts/Makefile.in
+++ b/mobile/android/fonts/Makefile.in
@@ -1,26 +1,6 @@
 # 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/.
 
-packaged_fonts =  \
-	CharisSILCompact-R.ttf \
-	CharisSILCompact-B.ttf \
-	CharisSILCompact-I.ttf \
-	CharisSILCompact-BI.ttf \
-	ClearSans-Thin.ttf \
-	ClearSans-Light.ttf \
-	ClearSans-Regular.ttf \
-	ClearSans-Medium.ttf \
-	ClearSans-Bold.ttf \
-	ClearSans-Italic.ttf \
-	ClearSans-MediumItalic.ttf \
-	ClearSans-BoldItalic.ttf \
-	$(NULL)
-
-GARBAGE += $(packaged_fonts)
-
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/testing/testsuite-targets.mk
-
-libs:: $(packaged_fonts)
-	$(INSTALL) $^ $(DIST)/bin/res/fonts/
--- a/mobile/android/fonts/moz.build
+++ b/mobile/android/fonts/moz.build
@@ -1,6 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+RESOURCE_FILES.fonts += [
+    'CharisSILCompact-B.ttf',
+    'CharisSILCompact-BI.ttf',
+    'CharisSILCompact-I.ttf',
+    'CharisSILCompact-R.ttf',
+    'ClearSans-Bold.ttf',
+    'ClearSans-BoldItalic.ttf',
+    'ClearSans-Italic.ttf',
+    'ClearSans-Light.ttf',
+    'ClearSans-Medium.ttf',
+    'ClearSans-MediumItalic.ttf',
+    'ClearSans-Regular.ttf',
+    'ClearSans-Thin.ttf',
+]
--- a/netwerk/test/Makefile.in
+++ b/netwerk/test/Makefile.in
@@ -12,20 +12,14 @@ LIBS		= $(XPCOM_LIBS) \
 
 DEFINES += $(TK_CFLAGS)
 
 include $(topsrcdir)/config/rules.mk
 
 check::
 	$(RUN_TEST_PROGRAM) $(DIST)/bin/TestCookie$(BIN_SUFFIX)
 
-_RES_FILES 	= urlparse.dat \
-		  urlparse_unx.dat \
-		  $(NULL)
-libs:: $(_RES_FILES)
-	$(INSTALL) $^ $(DIST)/bin/res
-
 # One of the xpcshell unit tests needs this file, so make sure it winds
 #  up in the test directory.
 libs::
 	$(NSINSTALL) -D $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit/data
 	$(INSTALL) $(topsrcdir)/netwerk/dns/effective_tld_names.dat \
           $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit/
--- a/netwerk/test/moz.build
+++ b/netwerk/test/moz.build
@@ -51,8 +51,12 @@ SOURCES += [
     '%s.cpp' % s for s in SIMPLE_PROGRAMS
 ]
 
 CPP_UNIT_TESTS += [
     'TestSTSParser.cpp',
     'TestUDPSocket.cpp',
 ]
 
+RESOURCE_FILES += [
+    'urlparse.dat',
+    'urlparse_unx.dat',
+]
--- a/rdf/tests/dsds/Makefile.in
+++ b/rdf/tests/dsds/Makefile.in
@@ -1,26 +1,12 @@
 #
 # 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/.
 
 MOZILLA_INTERNAL_API = 1
 
-SAMPLES_DIR	= $(DIST)/bin/res/samples/rdf
-
-RESOURCE_SAMPLES = \
-		DataSourceViewer.xul \
-		DataSourceViewer.css \
-		$(NULL)
-
 EXTRA_DSO_LDOPTS = \
 		-L$(DIST)/bin \
 		$(XPCOM_LIBS) \
 		$(NSPR_LIBS) \
 		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-GARBAGE		+= $(addprefix $(SAMPLES_DIR)/, $(RESOURCE_SAMPLES))
-
-libs::
-	$(INSTALL) $(addprefix $(srcdir)/,$(RESOURCE_SAMPLES)) $(SAMPLES_DIR)
--- a/rdf/tests/dsds/moz.build
+++ b/rdf/tests/dsds/moz.build
@@ -8,8 +8,12 @@ SOURCES += [
     'nsRDFDataSourceDS.cpp',
     'nsRDFDataSourceFactory.cpp',
 ]
 
 LIBRARY_NAME = 'rdfdsds'
 
 IS_COMPONENT = True
 
+RESOURCE_FILES.samples.rdf += [
+    'DataSourceViewer.xul',
+    'DataSourceViewer.css',
+]
--- a/tools/trace-malloc/Makefile.in
+++ b/tools/trace-malloc/Makefile.in
@@ -55,11 +55,8 @@ endif
 
 EXTRA_DEPS = $(EXTRACSRCS:.c=.$(OBJ_SUFFIX)) $(EXTRACPPSRCS:.cpp=.$(OBJ_SUFFIX))
 
 include $(topsrcdir)/config/rules.mk
 
 # install rules.txt along with spacetrace executable
 libs:: rules.txt
 	$(INSTALL) $< $(DIST)/bin
-
-libs:: spacetrace.css
-	$(INSTALL) $< $(DIST)/bin/res
--- a/tools/trace-malloc/moz.build
+++ b/tools/trace-malloc/moz.build
@@ -34,8 +34,12 @@ simple_cpp_sources = [
     'leaksoup',
 ]
 
 SOURCES += [
     '%s.cpp' % s for s in simple_cpp_sources
 ]
 
 SIMPLE_PROGRAMS += simple_cpp_sources
+
+RESOURCE_FILES += [
+    'spacetrace.css'
+]
--- a/widget/cocoa/Makefile.in
+++ b/widget/cocoa/Makefile.in
@@ -1,33 +1,8 @@
 #
 # 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/rules.mk
 
-NIB_FILES = \
-	classes.nib \
-	info.nib \
-	keyedobjects.nib \
-	$(NULL)
-NIB_DEST = $(DIST)/bin/res/MainMenu.nib
-
-libs:: $(addprefix $(NIB_DEST)/,$(NIB_FILES))
-
-$(NIB_DEST):
-	$(NSINSTALL) -D $@
-
-$(NIB_DEST)/%: $(srcdir)/resources/MainMenu.nib/% $(NIB_DEST)
-	$(INSTALL) $< $(NIB_DEST)
-
-# for objdir builds, symlink the cursors dir
-ABS_topsrcdir   := $(abspath $(topsrcdir))
-ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
-export::
-	ln -fs $(srcdir)/cursors
-endif
-
-export::
-	$(INSTALL) $(srcdir)/cursors $(DIST)/bin/res
-
 CXXFLAGS += $(TK_CFLAGS)
--- a/widget/cocoa/moz.build
+++ b/widget/cocoa/moz.build
@@ -76,8 +76,55 @@ FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '../shared',
     '../xpwidgets',
     '/layout/forms',
     '/layout/generic',
     '/layout/xul',
 ]
 
+RESOURCE_FILES.cursors += [
+    'cursors/arrowN.png',
+    'cursors/arrowN@2x.png',
+    'cursors/arrowS.png',
+    'cursors/arrowS@2x.png',
+    'cursors/cell.png',
+    'cursors/cell@2x.png',
+    'cursors/colResize.png',
+    'cursors/colResize@2x.png',
+    'cursors/help.png',
+    'cursors/help@2x.png',
+    'cursors/move.png',
+    'cursors/move@2x.png',
+    'cursors/rowResize.png',
+    'cursors/rowResize@2x.png',
+    'cursors/sizeNE.png',
+    'cursors/sizeNE@2x.png',
+    'cursors/sizeNESW.png',
+    'cursors/sizeNESW@2x.png',
+    'cursors/sizeNS.png',
+    'cursors/sizeNS@2x.png',
+    'cursors/sizeNW.png',
+    'cursors/sizeNW@2x.png',
+    'cursors/sizeNWSE.png',
+    'cursors/sizeNWSE@2x.png',
+    'cursors/sizeSE.png',
+    'cursors/sizeSE@2x.png',
+    'cursors/sizeSW.png',
+    'cursors/sizeSW@2x.png',
+    'cursors/vtIBeam.png',
+    'cursors/vtIBeam@2x.png',
+    'cursors/zoomIn.png',
+    'cursors/zoomIn@2x.png',
+    'cursors/zoomOut.png',
+    'cursors/zoomOut@2x.png',
+]
+
+# These resources go in $(DIST)/bin/res/MainMenu.nib, but we can't use a magic
+# RESOURCE_FILES.MainMenu.nib attribute, since that would put the files in
+# $(DIST)/bin/res/MainMenu/nib. Instead, we call __setattr__ directly to create
+# an attribute with the correct name.
+RESOURCE_FILES.__setattr__('MainMenu.nib', [
+    'resources/MainMenu.nib/classes.nib',
+    'resources/MainMenu.nib/info.nib',
+    'resources/MainMenu.nib/keyedobjects.nib',
+])
+
--- a/xpcom/sample/Makefile.in
+++ b/xpcom/sample/Makefile.in
@@ -13,13 +13,8 @@ EXTRA_DSO_LDOPTS = \
 		$(NULL)
 
 # Need to link with CoreFoundation on Mac
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 EXTRA_DSO_LDOPTS += \
 		$(TK_LIBS) \
 		$(NULL)
 endif
-
-include $(topsrcdir)/config/rules.mk
-
-libs:: $(TARGETS)
-	$(INSTALL) $(srcdir)/xpconnect-sample.html $(DIST)/bin/res/samples
--- a/xpcom/sample/moz.build
+++ b/xpcom/sample/moz.build
@@ -31,8 +31,11 @@ EXTRA_COMPONENTS += [
 
 # LIBRARY_NAME names the library generated by this makefile,
 # i.e. dist/bin/components/libxpcomsample.so
 LIBRARY_NAME = 'xpcomsample'
 
 # IS_COMPONENT indicates that this makefile builds a component shared library.
 IS_COMPONENT = True
 
+RESOURCE_FILES.samples += [
+    'xpconnect-sample.html',
+]
--- a/xpcom/tests/Makefile.in
+++ b/xpcom/tests/Makefile.in
@@ -4,19 +4,18 @@
 
 LIBS += $(XPCOM_LIBS)
 
 # Make sure we have symbols in case we need to debug these.
 MOZ_DEBUG_SYMBOLS = 1
 
 include $(topsrcdir)/config/rules.mk
 
+ifneq (,$(SIMPLE_PROGRAMS))
 libs::
-	$(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res
-ifneq (,$(SIMPLE_PROGRAMS))
 	$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
 endif
 
 ifeq (,$(filter-out WINNT, $(HOST_OS_ARCH)))
 getnativepath = $(call normalizepath,$(1))
 else
 getnativepath = $(1)
 endif
--- a/xpcom/tests/moz.build
+++ b/xpcom/tests/moz.build
@@ -117,8 +117,11 @@ if not CONFIG['MOZILLA_INTERNAL_API']:
     CPP_UNIT_TESTS += [
         'TestStringAPI.cpp',
     ]
 
 LOCAL_INCLUDES += [
     '../ds',
 ]
 
+RESOURCE_FILES += [
+    'test.properties',
+]