Bug 1266875 - Remove custom install rules; r?chmanchester draft
authorMike Shal <mshal@mozilla.com>
Mon, 18 Apr 2016 10:36:07 -0400
changeset 356523 f899de62e9456aacac5792cbd38097c61c6342ec
parent 355956 1c6385ae1fe7e37d8f23f958ce14582f07af729e
child 519425 4c7ffe3a70610fe06ef1f2f1806ccbc0c02a4a33
push id16539
push userbmo:mshal@mozilla.com
push dateTue, 26 Apr 2016 14:55:51 +0000
reviewerschmanchester
bugs1266875
milestone48.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
uriloader/exthandler/tests/Makefile.in
uriloader/exthandler/tests/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']
deleted file mode 100644
--- a/uriloader/exthandler/tests/Makefile.in
+++ /dev/null
@@ -1,11 +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
-
-# need the executable for running the xpcshell unit tests
-ifneq (,$(SIMPLE_PROGRAMS))
-libs::
-	$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
-endif
--- a/uriloader/exthandler/tests/moz.build
+++ b/uriloader/exthandler/tests/moz.build
@@ -17,8 +17,13 @@ if not CONFIG['MOZ_JSDOWNLOADS']:
 
 GeckoSimplePrograms([
     'WriteArgument',
 ], linkage=None)
 
 USE_LIBS += [
     'nspr',
 ]
+
+if CONFIG['COMPILE_ENVIRONMENT']:
+    TEST_HARNESS_FILES.xpcshell.uriloader.exthandler.tests.unit += [
+        '!WriteArgument%s' % CONFIG['BIN_SUFFIX'],
+    ]
--- a/xpcom/tests/Makefile.in
+++ b/xpcom/tests/Makefile.in
@@ -2,24 +2,16 @@
 # 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/.
 
 # 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) $(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
@@ -66,16 +66,24 @@ GeckoCppUnitTests([
     'TestThreadUtils'
 ])
 
 if CONFIG['MOZ_MEMORY']:
     GeckoCppUnitTests([
         'TestJemalloc',
     ])
 
+if CONFIG['COMPILE_ENVIRONMENT']:
+    TEST_HARNESS_FILES.xpcshell.xpcom.tests.unit += [
+        '!%s%s' % (f, CONFIG['BIN_SUFFIX']) for f in sorted(SIMPLE_PROGRAMS + CPP_UNIT_TESTS)
+    ]
+    TEST_HARNESS_FILES.xpcshell.xpcom.tests.unit += [
+        '!/dist/bin/components/xpcomtest.xpt',
+    ]
+
 # FIXME: bug 577500 TestStaticAtoms fails when run in dist/bin
 #CPP_UNIT_TESTS += [
 #    'TestStaticAtoms',
 #]
 
 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