Bug 1256979 - Move MOZ_CHROME_FILE_FORMAT to Python configure. r=glandium

The config variable is re-named to avoid confusion, because it is not set by
--enable-chrome-format.

MozReview-Commit-ID: 37gvjGGSkRc
This commit is contained in:
Chris Manchester 2016-04-14 12:26:38 -07:00
parent 9bec8a10ef
commit 6a21a3345a
8 changed files with 37 additions and 67 deletions

View File

@ -27,7 +27,6 @@ fi
# Enable building ./signmar and running libmar signature tests
MOZ_ENABLE_SIGNMAR=1
MOZ_CHROME_FILE_FORMAT=omni
MOZ_SAFE_BROWSING=1
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_CRYPTO=1

View File

@ -186,7 +186,6 @@ def old_configure_options(*options):
'--enable-b2g-camera',
'--enable-b2g-ril',
'--enable-bundled-fonts',
'--enable-chrome-format',
'--enable-clang-plugin',
'--enable-content-sandbox',
'--enable-cookies',

View File

@ -227,7 +227,7 @@ endif # NO_PROFILE_GUIDED_OPTIMIZE
MAKE_JARS_FLAGS = \
-t $(topsrcdir) \
-f $(MOZ_CHROME_FILE_FORMAT) \
-f $(MOZ_JAR_MAKER_FILE_FORMAT) \
$(NULL)
ifdef USE_EXTENSION_MANIFEST

View File

@ -22,7 +22,7 @@ REF_MANIFEST = $(if $(USE_EXTENSION_MANIFEST),chrome.manifest,test.manifest)
check-%::
if test -d $(FINAL_TARGET); then rm -rf $(FINAL_TARGET); fi;
$(MAKE) realchrome MOZ_CHROME_FILE_FORMAT=$*
$(MAKE) realchrome MOZ_JAR_MAKER_FILE_FORMAT=$*
@echo 'Comparing manifests...'
@if ! sort $(MY_MANIFEST) | diff --text -U 0 $(srcdir)/../$(REF_MANIFEST).$* - ; then \
echo 'TEST-UNEXPECTED-FAIL | config/tests/$(REF_MANIFEST).$* | differing content in manifest!' ; \

View File

@ -6,7 +6,6 @@
MOZ_APP_NAME=geckoembed
MOZ_APP_DISPLAYNAME=GeckoEmbed
MOZ_UPDATER=
MOZ_CHROME_FILE_FORMAT=omni
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_PLACES=1
MOZ_EXTENSIONS_DEFAULT=" gio"

View File

@ -196,7 +196,6 @@ if test -n "$gonkdir" ; then
AC_SUBST(ANDROID_VERSION)
AC_DEFINE(HAVE_SYS_UIO_H)
AC_DEFINE(HAVE_PTHREADS)
MOZ_CHROME_FILE_FORMAT=omni
direct_nspr_config=1
android_cxx_stl=mozstlport
else
@ -206,7 +205,6 @@ else
case "$target" in
*-android*|*-linuxandroid*)
MOZ_CHROME_FILE_FORMAT=omni
ZLIB_DIR=yes
AC_DEFINE(ANDROID)
;;
@ -6224,62 +6222,6 @@ dnl =
dnl ========================================================
MOZ_ARG_HEADER(Misc. Options)
dnl =========================================================
dnl = Chrome format
dnl =========================================================
MOZ_ARG_ENABLE_STRING([chrome-format],
[ --enable-chrome-format=jar|flat|omni
Select FORMAT of chrome files during packaging],
MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`)
if test -z "$MOZ_CHROME_FILE_FORMAT"; then
MOZ_CHROME_FILE_FORMAT=jar
fi
if test "$MOZ_CHROME_FILE_FORMAT" = "symlink"; then
AC_MSG_ERROR([--enable-chrome-format=symlink has been deprecated. It is now used by default in $DIST/bin on platforms that support it])
fi
if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
test "$MOZ_CHROME_FILE_FORMAT" != "flat" &&
test "$MOZ_CHROME_FILE_FORMAT" != "omni"; then
AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni])
fi
dnl =========================================================
dnl Omnijar packaging (bug 552121)
dnl =========================================================
dnl Omnijar packaging is compatible with flat packaging.
dnl In unpackaged builds, omnijar looks for files as if
dnl things were flat packaged. After packaging, all files
dnl are loaded from a single jar. MOZ_CHROME_FILE_FORMAT
dnl is set to flat since putting files into jars is only
dnl done during packaging with omnijar.
MOZ_PACKAGER_FORMAT="$MOZ_CHROME_FILE_FORMAT"
if test "$OS_ARCH" = "WINNT"; then
MOZ_CHROME_FILE_FORMAT=flat
else
MOZ_CHROME_FILE_FORMAT=symlink
fi
if test "$MOZ_WIDGET_TOOLKIT" = "android"; then
dnl Fennec's static resources live in the assets/ folder of the
dnl APK. Adding a path to the name here works because we only
dnl have one omnijar file in the final package (which is not the
dnl case on desktop), and necessitates some contortions during
dnl packaging so that the resources in the omnijar are considered
dnl as rooted at / and not as rooted at assets/ (which again is
dnl not the case on desktop: there are omnijars rooted at webrtc/,
dnl etc). packager.mk handles changing the rooting of the single
dnl omnijar.
OMNIJAR_NAME=assets/omni.ja
else
OMNIJAR_NAME=omni.ja
fi
AC_SUBST(OMNIJAR_NAME)
AC_SUBST(MOZ_PACKAGER_FORMAT)
dnl ========================================================
dnl = Define default location for MOZILLA_FIVE_HOME
dnl ========================================================
@ -7326,8 +7268,6 @@ AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
AC_SUBST(HAVE_X86_AVX2)
AC_SUBST(GCC_USE_GNU_LD)
AC_SUBST(MOZ_CHROME_FILE_FORMAT)
AC_SUBST(WRAP_LDFLAGS)
AC_SUBST(MKSHLIB)
AC_SUBST(MKCSHLIB)

View File

@ -84,7 +84,7 @@ class TestBuild(unittest.TestCase):
config.topobjdir)
overrides = [
'install_manifest_depends=',
'MOZ_CHROME_FILE_FORMAT=flat',
'MOZ_JAR_MAKER_FILE_FORMAT=flat',
'TEST_MOZBUILD=1',
]
with self.line_handler() as handle_make_line:
@ -108,7 +108,7 @@ class TestBuild(unittest.TestCase):
config.topobjdir)
overrides = [
'install_manifest_depends=',
'MOZ_CHROME_FILE_FORMAT=flat',
'MOZ_JAR_MAKER_FILE_FORMAT=flat',
'TEST_MOZBUILD=1',
]
with self.line_handler() as handle_make_line:

View File

@ -355,3 +355,36 @@ def eme_modules(value):
set_config('MOZ_EME', eme)
set_define('MOZ_EME', eme)
set_config('MOZ_EME_MODULES', eme_modules)
option(name='--enable-chrome-format',
help='Select FORMAT of chrome files during packaging.',
nargs=1,
choices=('omni', 'jar', 'flat'),
default='omni')
@depends('--enable-chrome-format')
def packager_format(value):
return value[0]
set_config('MOZ_PACKAGER_FORMAT', packager_format)
@depends(host)
def jar_maker_format(host):
return 'flat' if host.os == 'WINNT' else 'symlink'
set_config('MOZ_JAR_MAKER_FILE_FORMAT', jar_maker_format)
@depends(toolkit)
def omnijar_name(toolkit):
# Fennec's static resources live in the assets/ folder of the
# APK. Adding a path to the name here works because we only
# have one omnijar file in the final package (which is not the
# case on desktop), and necessitates some contortions during
# packaging so that the resources in the omnijar are considered
# as rooted at / and not as rooted at assets/ (which again is
# not the case on desktop: there are omnijars rooted at webrtc/,
# etc). packager.mk handles changing the rooting of the single
# omnijar.
return 'assets/omni.ja' if toolkit == 'android' else 'omni.ja'
set_config('OMNIJAR_NAME', omnijar_name)