Bug 1266875 - Remove custom install rules; r=chmanchester
authorMike Shal <mshal@mozilla.com>
Mon, 18 Apr 2016 10:36:07 -0400
changeset 357662 08b80f8477796921dca4f4a6bd789ee65532cffa
parent 357661 7c31012136711763b3a15d4bf6982c840fef6231
child 357663 95a303509a13455831347e5b0a146d5f0698dfb7
push id16816
push userbmo:gasolin@mozilla.com
push dateFri, 29 Apr 2016 03:33:20 +0000
reviewerschmanchester
bugs1266875
milestone49.0a1
Bug 1266875 - Remove custom install rules; r=chmanchester MozReview-Commit-ID: CoWdHidlDrV
js/src/shell/Makefile.in
js/src/shell/moz.build
layout/tools/reftest/Makefile.in
layout/tools/reftest/moz.build
toolkit/crashreporter/client/Makefile.in
toolkit/crashreporter/client/moz.build
toolkit/mozapps/update/updater/Makefile.in
toolkit/mozapps/update/updater/moz.build
xpcom/tests/Makefile.in
xpcom/tests/moz.build
--- a/js/src/shell/Makefile.in
+++ b/js/src/shell/Makefile.in
@@ -5,16 +5,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 ifdef QEMU_EXE
 MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
-# People expect the js shell to wind up in the top-level JS dir.
-libs::
-	$(INSTALL) $(IFLAGS2) $(PROGRAM) ..
-
-GARBAGE += ../$(PROGRAM)
-
 install:: $(PROGRAM)
 	$(SYSINSTALL) $^ $(DESTDIR)$(bindir)
--- a/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -54,8 +54,11 @@ shellmoduleloader.inputs = [
 if CONFIG['_MSC_VER']:
     CXXFLAGS += ['-wd4312']
 
 # Place a GDB Python auto-load file next to the shell executable, both in
 # the build directory and in the dist/bin directory.
 DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
 FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
 OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']
+
+# People expect the js shell to wind up in the top-level JS dir.
+OBJDIR_FILES.js.src += ['!js%s' % CONFIG['BIN_SUFFIX']]
--- a/layout/tools/reftest/Makefile.in
+++ b/layout/tools/reftest/Makefile.in
@@ -1,41 +1,18 @@
 # vim: set shiftwidth=8 tabstop=8 autoindent noexpandtab copyindent:
 # 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/.
 
 _DEST_DIR = $(DEPTH)/_tests/reftest
 
-_HARNESS_FILES = \
-  $(srcdir)/b2g_start_script.js \
-  $(srcdir)/runreftest.py \
-  $(srcdir)/reftestcommandline.py \
-  $(srcdir)/reftest-preferences.js \
-  $(srcdir)/remotereftest.py \
-  $(srcdir)/runreftestb2g.py \
-  $(srcdir)/runreftestmulet.py \
-  $(srcdir)/gaia_lock_screen.js \
-  $(srcdir)/output.py \
-  automation.py \
-  $(topsrcdir)/build/mobile/b2gautomation.py \
-  $(topsrcdir)/build/mobile/remoteautomation.py \
-  $(topsrcdir)/testing/mochitest/server.js \
-  $(topsrcdir)/build/pgo/server-locations.txt \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 # We're installing to _tests/reftest
 TARGET_DEPTH = ../..
 include $(topsrcdir)/build/automation-build.mk
 
-$(_DEST_DIR):
-	$(NSINSTALL) -D $@
-
-$(_HARNESS_FILES): $(_DEST_DIR)
-
 # copy harness and the reftest extension bits to $(_DEST_DIR)
 # This needs to happen after jar.mn handling from rules.mk included above.
 # The order of the :: rules ensures that.
-libs:: $(_HARNESS_FILES) $(addprefix $(_DEST_DIR)/,$(_HARNESS_PP_FILES))
-	$(INSTALL) $(_HARNESS_FILES) $(_DEST_DIR)
+libs::
 	(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - reftest) | (cd $(_DEST_DIR) && tar -xf -)
--- a/layout/tools/reftest/moz.build
+++ b/layout/tools/reftest/moz.build
@@ -7,8 +7,26 @@
 with Files('**'):
     BUG_COMPONENT = ('Testing', 'Reftest')
 
 XPI_NAME = 'reftest'
 USE_EXTENSION_MANIFEST = True
 JAR_MANIFESTS += ['jar.mn']
 FINAL_TARGET_PP_FILES += ['install.rdf']
 FINAL_TARGET_FILES += ['bootstrap.js']
+
+GENERATED_FILES += ['automation.py']
+TEST_HARNESS_FILES.reftest += [
+    '!automation.py',
+    '/build/mobile/b2gautomation.py',
+    '/build/mobile/remoteautomation.py',
+    '/build/pgo/server-locations.txt',
+    '/testing/mochitest/server.js',
+    'b2g_start_script.js',
+    'gaia_lock_screen.js',
+    'output.py',
+    'reftest-preferences.js',
+    'reftestcommandline.py',
+    'remotereftest.py',
+    'runreftest.py',
+    'runreftestb2g.py',
+    'runreftestmulet.py',
+]
--- a/toolkit/crashreporter/client/Makefile.in
+++ b/toolkit/crashreporter/client/Makefile.in
@@ -13,13 +13,8 @@ ifeq ($(OS_ARCH),Darwin)
 libs::
 	$(NSINSTALL) -D $(DIST)/bin/crashreporter.app
 	rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/crashreporter.app 
 	sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
 	  iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/crashreporter.app/Contents/Resources/English.lproj/InfoPlist.strings
 	$(NSINSTALL) -D $(DIST)/bin/crashreporter.app/Contents/MacOS
 	$(NSINSTALL) $(DIST)/bin/crashreporter $(DIST)/bin/crashreporter.app/Contents/MacOS
 endif
-
-ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
-libs:: $(topsrcdir)/toolkit/themes/windows/global/throbber/Throbber-small.gif
-	$(INSTALL) $^ $(DIST)/bin
-endif
--- a/toolkit/crashreporter/client/moz.build
+++ b/toolkit/crashreporter/client/moz.build
@@ -58,15 +58,20 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']
     USE_LIBS += [
         'breakpad_linux_common_s',
     ]
     OS_LIBS += CONFIG['TK_LIBS']
     OS_LIBS += CONFIG['MOZ_GTHREAD_LIBS']
     CXXFLAGS += CONFIG['TK_CFLAGS']
     CXXFLAGS += CONFIG['MOZ_GTHREAD_CFLAGS']
 
+if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'SunOS':
+    FINAL_TARGET_FILES += [
+        '/toolkit/themes/windows/global/throbber/Throbber-small.gif',
+    ]
+
 RCINCLUDE = 'crashreporter.rc'
 
 # Don't use the STL wrappers in the crashreporter clients; they don't
 # link with -lmozalloc, and it really doesn't matter here anyway.
 DISABLE_STL_WRAPPING = True
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -10,22 +10,16 @@ ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
-ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT)))
-libs:: updater.png
-	$(NSINSTALL) -D $(DIST)/bin/icons
-	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
-endif
-
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 libs::
 	$(NSINSTALL) -D $(DIST)/bin/updater.app
 	rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app 
 	sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
 	  iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
 	$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
 	$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -40,8 +40,11 @@ elif CONFIG['MOZ_UPDATE_CHANNEL'] in ('n
                                       'nightly-ux'):
     primary_cert.inputs += ['nightly_aurora_level3_primary.der']
     secondary_cert.inputs += ['nightly_aurora_level3_secondary.der']
 else:
     primary_cert.inputs += ['dep1.der']
     secondary_cert.inputs += ['dep2.der']
 
 xpcshell_cert.inputs += ['xpcshellCertificate.der']
+
+if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
+    FINAL_TARGET_FILES.icons += ['updater.png']
--- a/xpcom/tests/Makefile.in
+++ b/xpcom/tests/Makefile.in
@@ -7,19 +7,16 @@ MOZ_DEBUG_SYMBOLS = 1
 
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(SIMPLE_PROGRAMS))
 libs::
 	$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
 endif
 
-libs::
-	$(INSTALL) $(DIST)/bin/components/xpcomtest.xpt $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
-
 ifeq (,$(filter-out WINNT, $(HOST_OS_ARCH)))
 getnativepath = $(call normalizepath,$(1))
 else
 getnativepath = $(1)
 endif
 
 abs_srcdir = $(abspath $(srcdir))
 
--- a/xpcom/tests/moz.build
+++ b/xpcom/tests/moz.build
@@ -79,16 +79,20 @@ if CONFIG['MOZ_MEMORY']:
 if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT'):
     # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
     # FIXME bug 523378: also fails on OS X
     GeckoCppUnitTests([
         'TestDeadlockDetector',
         'TestDeadlockDetectorScalability',
     ])
 
+TEST_HARNESS_FILES.xpcshell.xpcom.tests.unit += [
+    '!/dist/bin/components/xpcomtest.xpt',
+]
+
 XPIDL_MODULE = 'xpcomtest'
 XPIDL_SOURCES += [
     'NotXPCOMTest.idl',
 ]
 
 # Don't add our test-only .xpt files to the normal manifests
 XPIDL_NO_MANIFEST = True