author Nick Alexander <>
Tue, 06 Mar 2018 20:09:37 -0800
changeset 417219 f0a4cabc8c940923aef39a2be39c10056eef891e
parent 417218 731eb2e4b5579cc727068d346a32a67d79ec6756
child 417493 fe5d46cd794bfb3e8974d8213cb3fa752902ef3b
permissions -rw-r--r--
Bug 1444546 - Part 4: Use GENERATED_FILES for Android JNI wrapper generation. r=froydnj,jchen MozReview-Commit-ID: 1IjoQdEMqr8

# 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

# Developer builds call mach -> Make -> gradle -> mach, which races to
# find and create .mozconfig files and to generate targets.

generated_resources := \
  AndroidManifest.xml \
  res/raw/browsersearch.json \
  res/raw/suggestedsites.json \
  res/values/strings.xml \

generated_files := \
  AndroidManifest.xml \
  generated/preprocessed/org/mozilla/gecko/ \
  generated/preprocessed/org/mozilla/gecko/ \
  generated/preprocessed/org/mozilla/gecko/ \

include $(topsrcdir)/config/

chrome-%:: AB_CD=$*
	$(MAKE) \
	  res/values$(AB_rCD)/strings.xml \
	  res/raw$(AB_rCD)/suggestedsites.json \
	  res/raw$(AB_rCD)/browsersearch.json \

include $(topsrcdir)/config/

# Override the Java settings with some specific android settings
include $(topsrcdir)/config/

# This target is only used by IDE integrations. It rebuilds resources
# that end up in omni.ja using the equivalent of |mach build faster|,
# does most of the packaging step, and then updates omni.ja in
# place. If you're not using an IDE, you should be using |mach build
# mobile/android && mach package|.
	$(MAKE) -C ../../../faster
	$(MAKE) -C ../installer stage-package
	$(MKDIR) -p $(@D)
	rsync --update $(DIST)/fennec/$(notdir $(OMNIJAR_NAME)) $@
	$(RM) $(DIST)/fennec/$(notdir $(OMNIJAR_NAME))

# Targets built very early during a Gradle build.  In automation,
# these are built before Gradle is invoked, and gradle-targets is not
# made at all.  This is required to avoid building gradle-targets with
# AB_CD=multi during multi-l10n builds.
gradle-targets: $(generated_resources) $(generated_files)

# Local developers update omni.ja during their builds.  There's a
# chicken-and-egg problem here.
gradle-omnijar: $(abspath $(DIST)/fennec/$(OMNIJAR_NAME))
# In automation, omni.ja is built only during packaging.


.PHONY: gradle-targets gradle-omnijar

export:: android_apks