Bug 1259555 - Remove many PP_TARGETS / INSTALL_TARGETS from mobile/android; r=nalexander
authorMike Shal <mshal@mozilla.com>
Wed, 23 Mar 2016 15:14:12 -0400
changeset 291285 e7da19944c6ce85c09fe96fbc1acc1b58abd3c9c
parent 291284 bb405b563fc3e4f91cc6d97c437424a8825a9930
child 291286 ec809e68ba7e040911dbebd1f0bd4d4081e3f56f
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1259555, 1259530
milestone48.0a1
Bug 1259555 - Remove many PP_TARGETS / INSTALL_TARGETS from mobile/android; r=nalexander The remaining android PP_TARGETS are for l10n or require support for passing flags to the preprocessor (bug 1259530). MozReview-Commit-ID: InnQF3e0DZ1
mobile/android/base/Makefile.in
mobile/android/base/moz.build
mobile/android/bouncer/Makefile.in
mobile/android/bouncer/moz.build
mobile/android/geckoview_library/Makefile.in
mobile/android/geckoview_library/moz.build
mobile/android/tests/background/junit3/Makefile.in
mobile/android/tests/background/junit3/moz.build
mobile/android/tests/browser/junit3/Makefile.in
mobile/android/tests/browser/junit3/moz.build
mobile/android/tests/browser/robocop/Makefile.in
mobile/android/tests/browser/robocop/moz.build
mobile/android/tests/browser/robocop/roboextender/Makefile.in
mobile/android/tests/browser/robocop/roboextender/moz.build
mobile/android/tests/javaaddons/Makefile.in
mobile/android/tests/javaaddons/moz.build
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -302,22 +302,16 @@ jni-stubs.inc: gecko-browser.jar constan
 ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar
 
 # This annotation processing step also generates
 # GeneratedJNIWrappers.h and GeneratedJNINatives.h
 GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES)
 GeneratedJNIWrappers.cpp: $(ALL_JARS)
 	$(JAVA) -classpath constants.jar:$(JAVA_BOOTCLASSPATH):$(JAVA_CLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $(ALL_JARS)
 
-manifest := \
-  AndroidManifest.xml.in \
-  $(NULL)
-
-PP_TARGETS += manifest
-
 # Certain source files need to be preprocessed.  This special rule
 # generates these files into generated/org/mozilla/gecko for
 # consumption by the build system and IDEs.
 
 # The list in moz.build looks like
 # 'preprocessed/org/mozilla/gecko/AppConstants.java'.  The list in
 # constants_PP_JAVAFILES looks like
 # 'generated/preprocessed/org/mozilla/gecko/AppConstants.java'.  We
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -977,8 +977,12 @@ if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']
         'gecko-thirdparty.jar',
         'gecko-util.jar'
     ]
 
 FINAL_TARGET_PP_FILES += ['package-name.txt.in']
 
 DEFINES['OBJDIR'] = OBJDIR
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
+
+OBJDIR_PP_FILES.mobile.android.base += [
+    'AndroidManifest.xml.in',
+]
--- a/mobile/android/bouncer/Makefile.in
+++ b/mobile/android/bouncer/Makefile.in
@@ -7,22 +7,14 @@ include $(topsrcdir)/config/config.mk
 JAVAFILES := \
 	java/org/mozilla/bouncer/BouncerService.java \
 	java/org/mozilla/gecko/BrowserApp.java \
   $(NULL)
 
 ANDROID_EXTRA_JARS := \
   $(NULL)
 
-PP_TARGETS += manifest
-manifest := $(srcdir)/AndroidManifest.xml.in
-manifest_TARGET := export
-# Special 'cuz they are set in mobile/android/defs.mk.
-manifest_FLAGS += \
-  -DMOZ_ANDROID_SHARED_ID="$(MOZ_ANDROID_SHARED_ID)" \
-  $(NULL)
-
 # Targets built very early during a Gradle build.
 gradle-targets: $(abspath AndroidManifest.xml)
 
 .PHONY: gradle-targets
 
 libs:: $(ANDROID_APK_NAME).apk
--- a/mobile/android/bouncer/moz.build
+++ b/mobile/android/bouncer/moz.build
@@ -25,8 +25,13 @@ ANDROID_ASSETS_DIRS += [
     'assets',
 ]
 
 if CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY']:
     # If you change this, also change its equivalent in mobile/android/base.
     ANDROID_ASSETS_DIRS += [
         '%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
     ]
+
+DEFINES['MOZ_ANDROID_SHARED_ID'] = CONFIG['MOZ_ANDROID_SHARED_ID']
+OBJDIR_PP_FILES.mobile.android.bouncer += [
+    'AndroidManifest.xml.in',
+]
--- a/mobile/android/geckoview_library/Makefile.in
+++ b/mobile/android/geckoview_library/Makefile.in
@@ -1,28 +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/.
 
-INSTALL_TARGETS += GECKOVIEW_LIBRARY
-GECKOVIEW_LIBRARY_DEST = $(CURDIR)
-GECKOVIEW_LIBRARY_FILES := \
-  .classpath \
-  .project \
-  build.xml \
-  $(NULL)
-
-PP_TARGETS += gen
-gen := \
-  local.properties.in \
-  project.properties.in \
-  AndroidManifest.xml.in \
-  $(NULL)
-gen_FLAGS += -DANDROID_SDK_ROOT=$(ANDROID_SDK_ROOT)
-
 GARBAGE_DIRS = \
   bin \
   libs \
   src \
   .deps \
   gen  \
   res \
   $(NULL)
--- a/mobile/android/geckoview_library/moz.build
+++ b/mobile/android/geckoview_library/moz.build
@@ -1,7 +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/.
 
 DEFINES['ANDROID_SDK'] = CONFIG['ANDROID_SDK']
+DEFINES['ANDROID_SDK_ROOT'] = CONFIG['ANDROID_SDK_ROOT']
+
+OBJDIR_FILES.mobile.android.geckoview_library += [
+    '.classpath',
+    '.project',
+    'build.xml',
+]
+
+OBJDIR_PP_FILES.mobile.android.geckoview_library += [
+    'AndroidManifest.xml.in',
+    'local.properties.in',
+    'project.properties.in',
+]
--- a/mobile/android/tests/background/junit3/Makefile.in
+++ b/mobile/android/tests/background/junit3/Makefile.in
@@ -1,21 +1,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/.
 
 ANDROID_EXTRA_JARS := \
   background-junit3.jar \
   $(NULL)
 
-PP_TARGETS        += manifest
-manifest          := $(srcdir)/AndroidManifest.xml.in
-manifest_TARGET   := AndroidManifest.xml
-manifest_FLAGS    += \
-  -DANDROID_BACKGROUND_TARGET_PACKAGE_NAME='$(ANDROID_PACKAGE_NAME)' \
-  -DANDROID_BACKGROUND_APP_DISPLAYNAME='$(MOZ_APP_DISPLAYNAME) Background Tests' \
-  -DMOZ_ANDROID_SHARED_ID='$(ANDROID_PACKAGE_NAME).sharedID' \
-  $(NULL)
 ANDROID_MANIFEST_FILE := $(CURDIR)/AndroidManifest.xml
 
 include $(topsrcdir)/config/rules.mk
 
 tools:: $(ANDROID_APK_NAME).apk
--- a/mobile/android/tests/background/junit3/moz.build
+++ b/mobile/android/tests/background/junit3/moz.build
@@ -27,8 +27,15 @@ jar.extra_jars += [
 ]
 
 if CONFIG['MOZ_ANDROID_MLS_STUMBLER']:
     jar.extra_jars += [
         TOPOBJDIR + '/mobile/android/stumbler/stumbler.jar',
     ]
 
 ANDROID_INSTRUMENTATION_MANIFESTS += ['instrumentation.ini']
+
+DEFINES['ANDROID_BACKGROUND_TARGET_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
+DEFINES['ANDROID_BACKGROUND_APP_DISPLAYNAME'] = '%s Background Tests' % CONFIG['MOZ_APP_DISPLAYNAME']
+DEFINES['MOZ_ANDROID_SHARED_ID'] = CONFIG['MOZ_ANDROID_SHARED_ID']
+OBJDIR_PP_FILES.mobile.android.tests.background.junit3 += [
+    'AndroidManifest.xml.in',
+]
--- a/mobile/android/tests/browser/junit3/Makefile.in
+++ b/mobile/android/tests/browser/junit3/Makefile.in
@@ -1,20 +1,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/.
 
 ANDROID_EXTRA_JARS += \
 	browser-junit3.jar \
   $(NULL)
 
-PP_TARGETS += manifest
-manifest := AndroidManifest.xml.in
-manifest_FLAGS += \
-  -DANDROID_BROWSER_TARGET_PACKAGE_NAME='$(ANDROID_PACKAGE_NAME)' \
-  -DANDROID_BROWSER_APP_DISPLAYNAME='$(MOZ_APP_DISPLAYNAME) Browser Tests' \
-  -DMOZ_ANDROID_SHARED_ID='$(ANDROID_PACKAGE_NAME).sharedID' \
-  $(NULL)
 ANDROID_MANIFEST_FILE := $(CURDIR)/AndroidManifest.xml
 
 include $(topsrcdir)/config/rules.mk
 
 tools:: $(ANDROID_APK_NAME).apk
--- a/mobile/android/tests/browser/junit3/moz.build
+++ b/mobile/android/tests/browser/junit3/moz.build
@@ -41,8 +41,15 @@ jar.extra_jars += [
 ]
 
 if CONFIG['MOZ_ANDROID_MLS_STUMBLER']:
     jar.extra_jars += [
         TOPOBJDIR + '/mobile/android/stumbler/stumbler.jar',
     ]
 
 ANDROID_INSTRUMENTATION_MANIFESTS += ['instrumentation.ini']
+
+DEFINES['ANDROID_BROWSER_TARGET_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
+DEFINES['ANDROID_BROWSER_APP_DISPLAYNAME'] = '%s Browser Tests' % CONFIG['MOZ_APP_DISPLAYNAME']
+DEFINES['MOZ_ANDROID_SHARED_ID'] = CONFIG['MOZ_ANDROID_SHARED_ID']
+OBJDIR_PP_FILES.mobile.android.tests.browser.junit3 += [
+    'AndroidManifest.xml.in',
+]
--- a/mobile/android/tests/browser/robocop/Makefile.in
+++ b/mobile/android/tests/browser/robocop/Makefile.in
@@ -29,29 +29,18 @@ ANDROID_EXTRA_JARS += \
   $(NULL)
 
 java-harness := $(addprefix $(srcdir)/src/org/mozilla/gecko/,$(_JAVA_HARNESS))
 java-tests   := \
   $(wildcard $(TESTPATH)/*.java) \
   $(wildcard $(TESTPATH)/components/*.java) \
   $(wildcard $(TESTPATH)/helpers/*.java)
 
-PP_TARGETS += manifest
-manifest := $(srcdir)/AndroidManifest.xml.in
-manifest_TARGET := export
-manifest_FLAGS += \
-  -DMOZ_ANDROID_SHARED_ID='$(ANDROID_PACKAGE_NAME).sharedID' \
-  $(NULL)
-
 ANDROID_MANIFEST_FILE := $(CURDIR)/AndroidManifest.xml
 
-GARBAGE += \
-  AndroidManifest.xml \
-  $(NULL)
-
 JAVAFILES += \
   $(java-harness) \
   $(java-tests) \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
--- a/mobile/android/tests/browser/robocop/moz.build
+++ b/mobile/android/tests/browser/robocop/moz.build
@@ -22,8 +22,13 @@ TEST_HARNESS_FILES.testing.mochitest.tes
     '*.sjs',
     '*.swf',
     '*.webm',
     '*.xml',
     'reader_mode_pages/**', # The ** preserves directory structure.
     'robocop*.js',
     'test*.js',
 ]
+
+DEFINES['MOZ_ANDROID_SHARED_ID'] = CONFIG['MOZ_ANDROID_SHARED_ID']
+OBJDIR_PP_FILES.mobile.android.tests.browser.robocop += [
+    'AndroidManifest.xml.in',
+]
--- a/mobile/android/tests/browser/robocop/roboextender/Makefile.in
+++ b/mobile/android/tests/browser/robocop/roboextender/Makefile.in
@@ -1,25 +1,9 @@
 #
 # 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/.
 
-TESTPATH = $(topsrcdir)/mobile/android/tests/browser/robocop/roboextender
-
-include $(DEPTH)/config/autoconf.mk
-
 TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions
 
-TEST_FILES = \
-  bootstrap.js \
-  install.rdf \
-  chrome.manifest \
-  $(NULL)
-TEST_DEST = $(TEST_EXTENSIONS_DIR)/roboextender@mozilla.org/
-INSTALL_TARGETS += TEST
-
-include $(topsrcdir)/config/rules.mk
-
-tools:: $(_TEST_FILES)
-	$(MKDIR) -p $(TEST_EXTENSIONS_DIR)/roboextender@mozilla.org/base
-	-cp $(TESTPATH)/base/* $(TEST_EXTENSIONS_DIR)/roboextender@mozilla.org/base
+tools::
 	-cp $(DEPTH)/mobile/android/tests/javaaddons/javaaddons-test.apk $(TEST_EXTENSIONS_DIR)/roboextender@mozilla.org/base
--- a/mobile/android/tests/browser/robocop/roboextender/moz.build
+++ b/mobile/android/tests/browser/robocop/roboextender/moz.build
@@ -1,6 +1,12 @@
 # -*- 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/.
 
+TEST_HARNESS_FILES.testing.mochitest.extensions['roboextender@mozilla.org'] += [
+    'base/**',
+    'bootstrap.js',
+    'chrome.manifest',
+    'install.rdf',
+]
--- a/mobile/android/tests/javaaddons/Makefile.in
+++ b/mobile/android/tests/javaaddons/Makefile.in
@@ -1,14 +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/.
 
-PP_TARGETS += manifest
-manifest := $(srcdir)/AndroidManifest.xml.in
-manifest_TARGET := export
 ANDROID_MANIFEST_FILE := $(CURDIR)/AndroidManifest.xml
 
 ANDROID_EXTRA_JARS := javaaddons-test.jar
 
 include $(topsrcdir)/config/rules.mk
 
 tools libs:: $(ANDROID_APK_NAME).apk
--- a/mobile/android/tests/javaaddons/moz.build
+++ b/mobile/android/tests/javaaddons/moz.build
@@ -12,8 +12,12 @@ jar.extra_jars += [
     TOPOBJDIR + '/mobile/android/javaaddons/javaaddons-1.0.jar',
 ]
 jar.javac_flags += ['-Xlint:all']
 jar.sources += [
     'src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java',
     'src/org/mozilla/javaaddons/test/JavaAddonV0.java',
     'src/org/mozilla/javaaddons/test/JavaAddonV1.java',
 ]
+
+OBJDIR_PP_FILES.mobile.android.tests.javaaddons += [
+    'AndroidManifest.xml.in',
+]