Bug 1043289 - Don't declare SOURCES and USE_LIBS when there is nothing to build. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 25 Jul 2014 07:10:15 +0900
changeset 195944 ae2061a3eb408723f9e0c96c1e2521eb0ee44e3d
parent 195943 560141fd63b24e6c61dbd349b8944ed1190c04cc
child 195945 77804ecb85661104f3c39dca83bcd89b9bbb2824
push id46748
push usermh@glandium.org
push dateThu, 24 Jul 2014 22:19:32 +0000
treeherdermozilla-inbound@0300f04572b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1043289
milestone34.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 1043289 - Don't declare SOURCES and USE_LIBS when there is nothing to build. r=mshal
build/unix/elfhack/moz.build
modules/libmar/tool/moz.build
toolkit/crashreporter/client/moz.build
--- a/build/unix/elfhack/moz.build
+++ b/build/unix/elfhack/moz.build
@@ -2,24 +2,21 @@
 # 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/.
 
 NO_DIST_INSTALL = True
 DIRS += ['inject']
 
-SOURCES += [
-    'test-array.c',
-    'test-ctors.c',
-]
-
 if not CONFIG['CROSS_COMPILE']:
     SOURCES += [
         'dummy.c',
+        'test-array.c',
+        'test-ctors.c',
     ]
 
 HOST_SOURCES += [
     'elf.cpp',
     'elfhack.cpp',
 ]
 
 HOST_PROGRAM = 'elfhack'
--- a/modules/libmar/tool/moz.build
+++ b/modules/libmar/tool/moz.build
@@ -1,42 +1,39 @@
 # -*- 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/.
 
-if CONFIG['MOZ_ENABLE_SIGNMAR']:
-    PROGRAM = 'signmar'
-
-SOURCES = [
+HOST_SOURCES += [
     'mar.c',
 ]
-HOST_SOURCES += SOURCES
 
 HOST_PROGRAM = 'mar'
 
 HOST_USE_LIBS += [
     'hostmar',
 ]
 
+if CONFIG['MOZ_ENABLE_SIGNMAR']:
+    PROGRAM = 'signmar'
+
+    SOURCES += HOST_SOURCES
+
+    USE_LIBS += [
+        'mar',
+        'signmar',
+        'verifymar',
+    ]
+
 for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'):
     DEFINES[var] = '"%s"' % CONFIG[var]
 
 if not CONFIG['MOZ_ENABLE_SIGNMAR']:
     DEFINES['NO_SIGN_VERIFY'] = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     USE_STATIC_LIBS = True
 elif CONFIG['OS_ARCH'] == 'Darwin':
     LDFLAGS += [
       '-framework Security',
     ]
-
-USE_LIBS += [
-    'mar',
-]
-
-if CONFIG['MOZ_ENABLE_SIGNMAR']:
-    USE_LIBS += [
-        'signmar',
-        'verifymar',
-    ]
--- a/toolkit/crashreporter/client/moz.build
+++ b/toolkit/crashreporter/client/moz.build
@@ -1,21 +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/.
 
 if CONFIG['OS_TARGET'] != 'Android':
     PROGRAM = 'crashreporter'
-# The xpcshell test case here verifies that the CA certificate list
 
-UNIFIED_SOURCES += [
-    'crashreporter.cpp',
-]
+    UNIFIED_SOURCES += [
+        'crashreporter.cpp',
+    ]
 
 LOCAL_INCLUDES += [
     '../google-breakpad/src',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     UNIFIED_SOURCES += [
         'crashreporter_win.cpp',