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
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -22,17 +22,16 @@ if test "$OS_ARCH" = "WINNT"; then
fi
fi
fi
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
MOZ_SERVICES_HEALTHREPORT=1
MOZ_SERVICES_SYNC=1
MOZ_SERVICES_CLOUDSYNC=1
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -180,17 +180,16 @@ def old_configure_options(*options):
'--enable-android-apz',
'--enable-android-omx',
'--enable-android-resource-constrained',
'--enable-approximate-location',
'--enable-b2g-bt',
'--enable-b2g-camera',
'--enable-b2g-ril',
'--enable-bundled-fonts',
- '--enable-chrome-format',
'--enable-clang-plugin',
'--enable-content-sandbox',
'--enable-cookies',
'--enable-cpp-rtti',
'--enable-crashreporter',
'--enable-ctypes',
'--enable-dbm',
'--enable-dbus',
--- a/config/config.mk
+++ b/config/config.mk
@@ -222,17 +222,17 @@ OS_LDFLAGS += $(PROFILE_USE_LDFLAGS)
ifeq (WINNT,$(OS_ARCH))
AR_FLAGS += -LTCG
endif
endif # MOZ_PROFILE_USE
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
MAKE_JARS_FLAGS += -e
endif
TAR_CREATE_FLAGS = -chf
--- a/config/tests/src-simple/Makefile.in
+++ b/config/tests/src-simple/Makefile.in
@@ -17,17 +17,17 @@ ACDEFINES += \
-DAB_CD=ab-X-stuff \
$(NULL)
MY_MANIFEST = $(if $(USE_EXTENSION_MANIFEST), $(FINAL_TARGET)/chrome.manifest, $(FINAL_TARGET)/chrome/test.manifest)
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!' ; \
false; \
fi
@if [ $* = 'jar' ]; then \
$(UNZIP) -d $(FINAL_TARGET)/chrome/test $(FINAL_TARGET)/chrome/test.jar; \
fi
--- a/embedding/ios/confvars.sh
+++ b/embedding/ios/confvars.sh
@@ -1,16 +1,15 @@
#! /bin/sh
# 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/.
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"
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_CRYPTO=1
MOZ_SERVICES_SYNC=1
MOZ_SERVICES_HEALTHREPORT=1
--- a/old-configure.in
+++ b/old-configure.in
@@ -192,27 +192,25 @@ if test -n "$gonkdir" ; then
LDFLAGS="-mandroid -L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ $LDFLAGS"
AC_DEFINE(ANDROID)
AC_DEFINE_UNQUOTED(ANDROID_VERSION, $ANDROID_VERSION)
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
if test "$COMPILE_ENVIRONMENT"; then
MOZ_ANDROID_NDK
fi # COMPILE_ENVIRONMENT
case "$target" in
*-android*|*-linuxandroid*)
- MOZ_CHROME_FILE_FORMAT=omni
ZLIB_DIR=yes
AC_DEFINE(ANDROID)
;;
*-linux*)
AC_PATH_PROG(OBJCOPY,objcopy)
;;
esac
fi
@@ -6236,72 +6234,16 @@ fi
dnl ========================================================
dnl =
dnl = Misc. Options
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 ========================================================
MOZ_ARG_WITH_STRING(default-mozilla-five-home,
[ --with-default-mozilla-five-home
Set the default value for MOZILLA_FIVE_HOME],
[ val=`echo $withval`
AC_DEFINE_UNQUOTED(MOZ_DEFAULT_MOZILLA_FIVE_HOME,"$val") ])
@@ -7344,18 +7286,16 @@ AC_SUBST(HOST_BIN_SUFFIX)
AC_SUBST(RUSTFLAGS)
AC_SUBST(TARGET_XPCOM_ABI)
AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
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)
AC_SUBST(DSO_CFLAGS)
AC_SUBST(DSO_PIC_CFLAGS)
AC_SUBST(DSO_LDOPTS)
AC_SUBST(LIB_PREFIX)
AC_SUBST(DLL_PREFIX)
--- a/python/mozbuild/mozbuild/test/backend/test_build.py
+++ b/python/mozbuild/mozbuild/test/backend/test_build.py
@@ -79,17 +79,17 @@ class TestBuild(unittest.TestCase):
def test_recursive_make(self):
substs = list(BASE_SUBSTS)
with self.do_test_backend(RecursiveMakeBackend,
substs=substs) as config:
build = MozbuildObject(config.topsrcdir, None, None,
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:
build._run_make(directory=config.topobjdir, target=overrides,
silent=False, line_handler=handle_make_line)
self.validate(config)
@@ -103,17 +103,17 @@ class TestBuild(unittest.TestCase):
ensureParentDir(buildid)
with open(buildid, 'w') as fh:
fh.write('20100101012345\n')
build = MozbuildObject(config.topsrcdir, None, None,
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:
build._run_make(directory=config.topobjdir, target=overrides,
silent=False, line_handler=handle_make_line)
self.validate(config)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -350,8 +350,41 @@ def eme_modules(value):
# PositiveOptionValue, but somehow, the JSON serialization in configure.py
# outputs inconsistent data in some cases when we do (a closing bracket
# without an opening one).
return list(value) if value else []
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)