Bug 1174757 - Pre: Don't archive geckoview resources when not necessary. r=glandium

This is a small optimization that will also make it easier to flip the
MOZ_DISABLE_GECKOVIEW conditional.  We don't currently package
geckolibs without geckoview, and it's reasonable to do both if we want
one.

--HG--
extra : commitid : FcLlG6E3PRQ
extra : rebase_source : ea22994bfa6815468763128995d41c0d6c625d60
extra : histedit_source : a25e0c5c4b5a97bde8871b5e4139e0f0fd4f6a36
This commit is contained in:
Nick Alexander 2015-06-25 16:48:15 -07:00
Родитель 22557d9312
Коммит f2870bd3a6
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -355,12 +355,14 @@ cd $(2) && zip -q $(1) -r * -x $(subst *,\*,$(not_android_res_files))
endef
ifndef MOZ_DISABLE_GECKOVIEW
# We delete the archive before updating so that resources removed from
# the filesystem are removed from the archive.
geckoview_resources.zip: $(all_resources) $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(RM) -rf $@
$(foreach dir,$(ANDROID_RES_DIRS),$(call zip_directory_with_relative_paths,$(CURDIR)/$@,$(dir)))
endif
# All of generated/org/mozilla/gecko/R.java, gecko.ap_, and R.txt are
# produced by aapt; this saves aapt invocations. The trailing
@ -493,8 +495,12 @@ gradle-omnijar: $(abspath $(DIST)/fennec/$(OMNIJAR_NAME))
.PHONY: gradle-targets gradle-omnijar
libs:: geckoview_resources.zip classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp $(CURDIR)/fennec_ids.txt
ifndef MOZ_DISABLE_GECKOVIEW
libs:: geckoview_resources.zip
$(INSTALL) geckoview_resources.zip $(FINAL_TARGET)
endif
libs:: classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp $(CURDIR)/fennec_ids.txt
$(INSTALL) classes.dex $(FINAL_TARGET)
@(diff jni-stubs.inc $(topsrcdir)/mozglue/android/jni-stubs.inc >/dev/null && diff GeneratedJNIWrappers.cpp $(topsrcdir)/widget/android/GeneratedJNIWrappers.cpp >/dev/null) || \
(echo '*****************************************************' && \

Просмотреть файл

@ -367,6 +367,7 @@ endif
# Create Android ARchives and metadata for download by local
# developers using Gradle.
ifdef MOZ_ANDROID_GECKOLIBS_AAR
ifndef MOZ_DISABLE_GECKOVIEW
geckoaar-revision := $(BUILDID)
UPLOAD_EXTRA_FILES += \
@ -392,8 +393,11 @@ INNER_MAKE_GECKOLIBS_AAR= \
--distdir '$(_ABS_DIST)' \
'$(_ABS_DIST)'
else
INNER_MAKE_GECKOLIBS_AAR=echo 'Android geckolibs.aar packaging requires packaging geckoview'
endif # MOZ_DISABLE_GECKOVIEW
else
INNER_MAKE_GECKOLIBS_AAR=echo 'Android geckolibs.aar packaging is disabled'
endif
endif # MOZ_ANDROID_GECKOLIBS_AAR
ifdef MOZ_OMX_PLUGIN
DIST_FILES += libomxplugin.so libomxplugingb.so libomxplugingb235.so \