From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- build/mozconfig.comm-support | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 build/mozconfig.comm-support (limited to 'build/mozconfig.comm-support') diff --git a/build/mozconfig.comm-support b/build/mozconfig.comm-support new file mode 100644 index 0000000000..5c7465965f --- /dev/null +++ b/build/mozconfig.comm-support @@ -0,0 +1,49 @@ +# 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 gets included under two circumstances. +# 1. comm-central is being built as a subdirectory of mozilla-central. +# 2. comm-central is being built as a parent directory of mozilla-central, +# but `mach` was invoked from the objdir and thinks that $topsrcdir is +# the mozilla-central directory. If we detect this is the case, we fix +# $topsrcdir before proceeding. +# In either case, we then invoke the identically named file that lives in +# comm-central, which sets some variables that can be used by the rest of the +# mozconfig. + + +# Note that the top-level mozconfig file is in $2. + +if [ "$(dirname "$2")" = "$topsrcdir" ]; then + # No weirdness + if [ -d "$topsrcdir/mail" ]; then + # Building with comm-central as top-level directory. + echo "ERROR: Should not include mozilla/build/mozconfig.comm when building" + echo " with comm-central as top-level directory." + exit 1 + elif [ -d "$topsrcdir/comm/mail" ]; then + # Building with mozilla-central as top-level directory. + . "$topsrcdir/comm/build/mozconfig.comm-support" + else + echo "ERROR: Unknown build directory layout." + exit 1 + fi +elif [ "$(dirname "$2")" = "$(dirname "$topsrcdir")" ]; then + if [ -d "$topsrcdir/../mail" ]; then + # Building with comm-central as top-level directory; + # but invoked with $topsrcdir as "mozilla/". + topsrcdir=$(dirname "$topsrcdir") + . "$topsrcdir/build/mozconfig.comm-support" + else + echo "ERROR: Unknown build directory layout." + exit 1 + fi +else + echo "ERROR: Unknown build directory layout." + exit 1 +fi -- cgit v1.2.3