Bug 1410475: Add support for detecting whether c-c is topdir in mozconfigs; r?Fallen,build-peer
MozReview-Commit-ID: KdakNqn2ETl
--- a/build/check-sync-exceptions
+++ b/build/check-sync-exceptions
@@ -1,15 +1,16 @@
dumbmake-dependencies
mach_bootstrap.py
merge-installrdf.py
pymake
client.py-args
client.py-l10n-args
configobj.py
+mozconfig.comm-support
# Ignore detritus left lying around by editing tools.
*~
.#*
#*#
*.orig
*.rej
new file mode 100644
--- /dev/null
+++ b/build/mozconfig.comm-support
@@ -0,0 +1,22 @@
+# This file exists to support comm-central from building with mozilla-central
+# as a subdirectory to building as a subdirectory of mozilla-central.
+
+# In order to have mozconfig files that support building in either
+# configuration during the transition, without duplicating the logic
+# in every mozconfig file, there needs to exist a file that exists at the
+# same path in mozilla-central and comm-central.
+
+# This file sets some variables that can be used by the rest of the mozconfig
+# to find other include files.
+
+if [ -d "$topsrcdir/mail" ]; then
+ # Building with comm-central as top-level directory.
+ commtopsrcdir=$topsrcdir
+ MOZ_IS_COMM_TOPDIR=1
+elif [ -d "$topsrcdir/comm/mail" ]; then
+ # Building with mozila-central as top-level directory.
+ commtopsrcdir=$topsrcdir/comm
+else
+ echo "ERROR: Unknown build directory layout."
+ exit 1
+fi
--- a/mail/config/mozconfigs/linux64/nightly
+++ b/mail/config/mozconfigs/linux64/nightly
@@ -1,16 +1,21 @@
+. "$topsrcdir/build/mozconfig.comm-support"
. $topsrcdir/build/unix/mozconfig.linux
-. "$topsrcdir/build/mozconfig.stylo"
+. "$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
-ac_add_options --enable-application=mail
+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-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
@@ -23,17 +28,18 @@ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSI
# 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
+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"
# Bug 1387239
# Use bzip2 mar update compression, to allow upgrading of older nightly builds.
mk_add_options "export MAR_OLD_FORMAT=1"