Bug 900522 - Part 1: Make ANDROID_RESFILES a moz.build-only variable. r=gps
authorNick Alexander <nalexander@mozilla.com>
Wed, 09 Oct 2013 16:18:00 -0700
changeset 151033 7bbd04f256988298d56eb5e6b549d79bb16fa2f2
parent 151032 85fc49eda28abe327690b2318cd1b0126c5e7742
child 151034 b63f1891d3e94d18f057dfd9bee58d69af3969b6
push id3081
push usernalexander@mozilla.com
push dateWed, 16 Oct 2013 21:24:04 +0000
treeherderfx-team@e85fb9e5291a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs900522, 923306
milestone27.0a1
Bug 900522 - Part 1: Make ANDROID_RESFILES a moz.build-only variable. r=gps This depends on Bug 923306, which I think is close to r=glandium. Since this is more moz.build than Android, r?=gps.
build/mobile/robocop/Makefile.in
build/mobile/robocop/moz.build
build/mobile/sutagent/android/Makefile.in
build/mobile/sutagent/android/fencp/Makefile.in
build/mobile/sutagent/android/fencp/moz.build
build/mobile/sutagent/android/ffxcp/Makefile.in
build/mobile/sutagent/android/ffxcp/moz.build
build/mobile/sutagent/android/moz.build
build/mobile/sutagent/android/watcher/Makefile.in
build/mobile/sutagent/android/watcher/moz.build
config/rules.mk
js/src/config/rules.mk
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
--- a/build/mobile/robocop/Makefile.in
+++ b/build/mobile/robocop/Makefile.in
@@ -7,20 +7,16 @@ TESTPATH     := $(topsrcdir)/$(mobile-te
 dir-tests    := $(DEPTH)/$(mobile-tests)
 
 ANDROID_APK_NAME := robocop-debug
 
 ANDROID_EXTRA_JARS += \
   $(srcdir)/robotium-solo-4.2.jar \
   $(NULL)
 
-ANDROID_RESFILES = \
-  res/values/strings.xml \
-  $(NULL)
-
 ANDROID_ASSETS_DIR := $(TESTPATH)/assets
 
 _JAVA_HARNESS := \
   Actions.java \
   Assert.java \
   Driver.java \
   Element.java \
   FennecInstrumentationTestRunner.java \
--- a/build/mobile/robocop/moz.build
+++ b/build/mobile/robocop/moz.build
@@ -1,8 +1,11 @@
 # -*- 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/.
 
 MODULE = 'robocop'
 
+ANDROID_RESFILES = [
+    'res/values/strings.xml',
+]
--- a/build/mobile/sutagent/android/Makefile.in
+++ b/build/mobile/sutagent/android/Makefile.in
@@ -15,26 +15,16 @@ JAVAFILES = \
   Power.java \
   RedirOutputThread.java \
   RunCmdThread.java \
   RunDataThread.java \
   SUTAgentAndroid.java \
   WifiConfiguration.java \
   $(NULL)
 
-ANDROID_RESFILES = \
-  res/drawable/icon.png \
-  res/drawable/ateamlogo.png \
-  res/drawable/ic_stat_first.png \
-  res/drawable/ic_stat_neterror.png \
-  res/drawable/ic_stat_warning.png \
-  res/layout/main.xml \
-  res/values/strings.xml \
-  $(NULL)
-
 ANDROID_EXTRA_JARS = \
   $(srcdir)/network-libs/commons-net-2.0.jar \
   $(srcdir)/network-libs/jmdns.jar \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 tools:: $(ANDROID_APK_NAME).apk
--- a/build/mobile/sutagent/android/fencp/Makefile.in
+++ b/build/mobile/sutagent/android/fencp/Makefile.in
@@ -6,19 +6,11 @@ ANDROID_APK_NAME := FenCP
 
 JAVAFILES = \
   DirCursor.java \
   FenCP.java \
   FenCPFP.java \
   FileCursor.java \
   $(NULL)
 
-ANDROID_RESFILES = \
-  res/drawable-hdpi/icon.png \
-  res/drawable-ldpi/icon.png \
-  res/drawable-mdpi/icon.png \
-  res/layout/main.xml \
-  res/values/strings.xml \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 tools:: $(ANDROID_APK_NAME).apk
--- a/build/mobile/sutagent/android/fencp/moz.build
+++ b/build/mobile/sutagent/android/fencp/moz.build
@@ -1,8 +1,15 @@
 # -*- 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/.
 
 MODULE = 'FenCP'
 
+ANDROID_RESFILES = [
+    'res/drawable-hdpi/icon.png',
+    'res/drawable-ldpi/icon.png',
+    'res/drawable-mdpi/icon.png',
+    'res/layout/main.xml',
+    'res/values/strings.xml',
+]
--- a/build/mobile/sutagent/android/ffxcp/Makefile.in
+++ b/build/mobile/sutagent/android/ffxcp/Makefile.in
@@ -6,19 +6,11 @@ ANDROID_APK_NAME := FfxCP
 
 JAVAFILES = \
   DirCursor.java \
   ffxcp.java \
   FfxCPFP.java \
   FileCursor.java \
   $(NULL)
 
-ANDROID_RESFILES = \
-  res/drawable-hdpi/icon.png \
-  res/drawable-ldpi/icon.png \
-  res/drawable-mdpi/icon.png \
-  res/layout/main.xml \
-  res/values/strings.xml \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 tools:: $(ANDROID_APK_NAME).apk
--- a/build/mobile/sutagent/android/ffxcp/moz.build
+++ b/build/mobile/sutagent/android/ffxcp/moz.build
@@ -1,8 +1,15 @@
 # -*- 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/.
 
 MODULE = 'FfxCP'
 
+ANDROID_RESFILES = [
+    'res/drawable-hdpi/icon.png',
+    'res/drawable-ldpi/icon.png',
+    'res/drawable-mdpi/icon.png',
+    'res/layout/main.xml',
+    'res/values/strings.xml',
+]
--- a/build/mobile/sutagent/android/moz.build
+++ b/build/mobile/sutagent/android/moz.build
@@ -1,8 +1,17 @@
 # -*- 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/.
 
 MODULE = 'sutAgentAndroid'
 
+ANDROID_RESFILES = [
+    'res/drawable/ateamlogo.png',
+    'res/drawable/ic_stat_first.png',
+    'res/drawable/ic_stat_neterror.png',
+    'res/drawable/ic_stat_warning.png',
+    'res/drawable/icon.png',
+    'res/layout/main.xml',
+    'res/values/strings.xml',
+]
--- a/build/mobile/sutagent/android/watcher/Makefile.in
+++ b/build/mobile/sutagent/android/watcher/Makefile.in
@@ -7,22 +7,11 @@ ANDROID_APK_NAME := Watcher
 JAVAFILES = \
   IWatcherService.java \
   RedirOutputThread.java \
   WatcherMain.java \
   WatcherReceiver.java \
   WatcherService.java \
   $(NULL)
 
-ANDROID_RESFILES = \
-  res/drawable-hdpi/icon.png \
-  res/drawable-hdpi/ateamlogo.png \
-  res/drawable-ldpi/icon.png \
-  res/drawable-ldpi/ateamlogo.png \
-  res/drawable-mdpi/icon.png \
-  res/drawable-mdpi/ateamlogo.png \
-  res/layout/main.xml \
-  res/values/strings.xml \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 tools:: $(ANDROID_APK_NAME).apk
--- a/build/mobile/sutagent/android/watcher/moz.build
+++ b/build/mobile/sutagent/android/watcher/moz.build
@@ -1,8 +1,18 @@
 # -*- 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/.
 
 MODULE = 'Watcher'
 
+ANDROID_RESFILES = [
+    'res/drawable-hdpi/ateamlogo.png',
+    'res/drawable-hdpi/icon.png',
+    'res/drawable-ldpi/ateamlogo.png',
+    'res/drawable-ldpi/icon.png',
+    'res/drawable-mdpi/ateamlogo.png',
+    'res/drawable-mdpi/icon.png',
+    'res/layout/main.xml',
+    'res/values/strings.xml',
+]
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -16,16 +16,17 @@ ifdef INCLUDED_RULES_MK
 endif
 INCLUDED_RULES_MK = 1
 
 # Integrate with mozbuild-generated make files. We first verify that no
 # variables provided by the automatically generated .mk files are
 # present. If they are, this is a violation of the separation of
 # responsibility between Makefile.in and mozbuild files.
 _MOZBUILD_EXTERNAL_VARIABLES := \
+  ANDROID_RESFILES \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -16,16 +16,17 @@ ifdef INCLUDED_RULES_MK
 endif
 INCLUDED_RULES_MK = 1
 
 # Integrate with mozbuild-generated make files. We first verify that no
 # variables provided by the automatically generated .mk files are
 # present. If they are, this is a violation of the separation of
 # responsibility between Makefile.in and mozbuild files.
 _MOZBUILD_EXTERNAL_VARIABLES := \
+  ANDROID_RESFILES \
   CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -134,16 +134,17 @@ class TreeMetadataEmitter(LoggingMixin):
                         % (symbol, src, sandbox['RELATIVEDIR']))
 
         # Proxy some variables as-is until we have richer classes to represent
         # them. We should aim to keep this set small because it violates the
         # desired abstraction of the build definition away from makefiles.
         passthru = VariablePassthru(sandbox)
         varmap = dict(
             # Makefile.in : moz.build
+            ANDROID_RESFILES='ANDROID_RESFILES',
             ASFILES='ASFILES',
             CMMSRCS='CMMSRCS',
             CPPSRCS='CPP_SOURCES',
             CPP_UNIT_TESTS='CPP_UNIT_TESTS',
             CSRCS='CSRCS',
             EXPORT_LIBRARY='EXPORT_LIBRARY',
             EXTRA_COMPONENTS='EXTRA_COMPONENTS',
             EXTRA_JS_MODULES='EXTRA_JS_MODULES',
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -38,16 +38,23 @@ from mozbuild.util import (
 #      programs and libraries.
 # - 'libs': everything that is not compile or binaries and that has
 #      traditionally been in the libs tier.
 # - 'tools'
 # A value of None means the variable has no direct effect on any tier.
 
 VARIABLES = {
     # Variables controlling reading of other frontend files.
+    'ANDROID_RESFILES': (StrictOrderingOnAppendList, list, [],
+        """Android resource files.
+
+        This variable contains a list of files to package into a 'res'
+        directory and merge into an APK file.
+        """, 'export'),
+
     'ASFILES': (StrictOrderingOnAppendList, list, [],
         """Assembly file sources.
 
         This variable contains a list of files to invoke the assembler on.
         """, 'compile'),
 
     'CMMSRCS': (StrictOrderingOnAppendList, list, [],
         """Sources to compile with the Objective C/C++ compiler.