Bug 1418593: Refactor linux64 mozconfigs to handle m-c topdir.
MozReview-Commit-ID: 19u2nGXNsmy
new file mode 100644
--- /dev/null
+++ b/mail/config/mozconfigs/common
@@ -0,0 +1,11 @@
+if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
+ ac_add_options --enable-application=mail
+else
+ ac_add_options --enable-application=comm/mail
+fi
+ac_add_options --enable-calendar
+
+if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
+ mk_add_options CLIENT_PY_ARGS="$([ -f "$topsrcdir/build/client.py-args" ] && cat "$topsrcdir/build/client.py-args")"
+ mk_add_options ALWAYS_RUN_CLIENT_PY=1
+fi
--- a/mail/config/mozconfigs/linux64/debug
+++ b/mail/config/mozconfigs/linux64/debug
@@ -1,30 +1,28 @@
-# Disable webrender on Linux buildbot builders to avoid the Rust requirement
-# of libX11 version > 1.4.99.1 (see bug 1350011).
-ac_add_options --disable-webrender
+. "$topsrcdir/build/mozconfig.comm-support"
+. "$topsrcdir/build/unix/mozconfig.linux"
+. "$topsrcdir/build/mozconfig.stylo"
+. "$commtopsrcdir/mail/config/mozconfigs/common"
-ac_add_options --enable-application=mail
+if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
+ # Disable webrender on Linux buildbot builders to avoid the Rust requirement
+ # of libX11 version > 1.4.99.1 (see bug 1350011).
+ ac_add_options --disable-webrender
+fi
+
ac_add_options --enable-debug
-ac_add_options --enable-calendar
-
-. $topsrcdir/build/unix/mozconfig.linux
-. "$topsrcdir/build/mozconfig.stylo"
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
# For NSS symbols
export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
-# Run client.py
-mk_add_options CLIENT_PY_ARGS="$([ -f $topsrcdir/build/client.py-args ] && cat $topsrcdir/build/client.py-args)"
-mk_add_options ALWAYS_RUN_CLIENT_PY=1
-
. "$topsrcdir/build/mozconfig.cache"
--- a/mail/config/mozconfigs/linux64/l10n-mozconfig
+++ b/mail/config/mozconfigs/linux64/l10n-mozconfig
@@ -1,31 +1,27 @@
-. $topsrcdir/build/unix/mozconfig.linux
+. "$topsrcdir/build/mozconfig.comm-support"
+. "$topsrcdir/build/unix/mozconfig.linux"
. "$topsrcdir/build/mozconfig.stylo"
-
-# Disable webrender on Linux buildbot builders to avoid the Rust requirement
-# of libX11 version > 1.4.99.1 (see bug 1350011).
-ac_add_options --disable-webrender
+. "$commtopsrcdir/mail/config/mozconfigs/common"
-ac_add_options --enable-application=mail
-ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
+if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
+ # Disable webrender on Linux buildbot builders to avoid the Rust requirement
+ # of libX11 version > 1.4.99.1 (see bug 1350011).
+ ac_add_options --disable-webrender
+fi
+
+ac_add_options --enable-update-channel="${MOZ_UPDATE_CHANNEL}"
ac_add_options --with-l10n-base=../../l10n
-. $topsrcdir/build/mozconfig.no-compile
-
-# Build lightning locales
-ac_add_options --enable-calendar
+. "$topsrcdir/build/mozconfig.no-compile"
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
# For NSS symbols
export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
ac_add_options --disable-stdcxx-compat
-
-# Run client.py
-mk_add_options CLIENT_PY_ARGS="$([ -f $topsrcdir/build/client.py-l10n-args ] && cat $topsrcdir/build/client.py-l10n-args)"
-mk_add_options ALWAYS_RUN_CLIENT_PY=1
--- a/mail/config/mozconfigs/linux64/nightly
+++ b/mail/config/mozconfigs/linux64/nightly
@@ -1,25 +1,22 @@
. "$topsrcdir/build/mozconfig.comm-support"
-. $topsrcdir/build/unix/mozconfig.linux
-. "$commtopsrcdir/build/mozconfig.stylo"
-
-# Disable webrender on Linux buildbot builders to avoid the Rust requirement
-# of libX11 version > 1.4.99.1 (see bug 1350011).
-ac_add_options --disable-webrender
+. "$topsrcdir/build/unix/mozconfig.linux"
+. "$topsrcdir/build/mozconfig.stylo"
+. "$commtopsrcdir/mail/config/mozconfigs/common"
if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
- ac_add_options --enable-application=mail
-else
- ac_add_options --enable-application=comm/mail
+ # Disable webrender on Linux buildbot builders to avoid the Rust requirement
+ # of libX11 version > 1.4.99.1 (see bug 1350011).
+ ac_add_options --disable-webrender
fi
-ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
+
+ac_add_options --enable-update-channel="${MOZ_UPDATE_CHANNEL}"
ac_add_options --enable-profiling
ac_add_options --disable-elf-hack # --enable-elf-hack conflicts with --enable-profiling
-ac_add_options --enable-calendar
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
# For NSS symbols
export MOZ_DEBUG_SYMBOLS=1
@@ -27,14 +24,9 @@ export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
-if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
- mk_add_options CLIENT_PY_ARGS="$([ -f $topsrcdir/build/client.py-args ] && cat $topsrcdir/build/client.py-args)"
- mk_add_options ALWAYS_RUN_CLIENT_PY=1
-fi
-
. "$topsrcdir/build/mozconfig.cache"
--- a/mail/config/mozconfigs/linux64/release
+++ b/mail/config/mozconfigs/linux64/release
@@ -1,31 +1,30 @@
-. $topsrcdir/build/unix/mozconfig.linux
+. "$topsrcdir/build/mozconfig.comm-support"
+. "$topsrcdir/build/unix/mozconfig.linux"
. "$topsrcdir/build/mozconfig.stylo"
+. "$commtopsrcdir/mail/config/mozconfigs/common"
+
-# Disable webrender on Linux buildbot builders to avoid the Rust requirement
-# of libX11 version > 1.4.99.1 (see bug 1350011).
-ac_add_options --disable-webrender
+if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
+ # Disable webrender on Linux buildbot builders to avoid the Rust requirement
+ # of libX11 version > 1.4.99.1 (see bug 1350011).
+ ac_add_options --disable-webrender
+fi
-ac_add_options --enable-application=mail
-ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
+ac_add_options --enable-update-channel="${MOZ_UPDATE_CHANNEL}"
ac_add_options --enable-official-branding
-ac_add_options --enable-calendar
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
# For NSS symbols
export MOZ_DEBUG_SYMBOLS=1
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
-
-# Run client.py
-mk_add_options CLIENT_PY_ARGS="$([ -f $topsrcdir/build/client.py-args ] && cat $topsrcdir/build/client.py-args)"
-mk_add_options ALWAYS_RUN_CLIENT_PY=1
--- a/mail/config/mozconfigs/linux64/source
+++ b/mail/config/mozconfigs/linux64/source
@@ -1,11 +1,7 @@
+. "$topsrcdir/build/mozconfig.comm-support"
+. "$commtopsrcdir/mail/config/mozconfigs/common"
+
# The source "build" only needs a mozconfig because we use the build system as
# our script for generating it. This allows us to run configure without any
# extra dependencies on specific toolchains, e.g. gtk3.
-ac_add_options --disable-compile-environment
-
-ac_add_options --enable-application=mail
-ac_add_options --enable-calendar
-
-# Run client.py (needed so that mozilla-* is included in the source tarball)
-mk_add_options CLIENT_PY_ARGS="$([ -f $topsrcdir/build/client.py-args ] && cat $topsrcdir/build/client.py-args)"
-mk_add_options ALWAYS_RUN_CLIENT_PY=1
+. "$topsrcdir/build/mozconfig.no-compile"