Bug 1410475: Add support for detecting whether c-c is topdir in mozconfigs; r=mshal a=jorgk DONTBUILD
authorTom Prince <mozilla@hocat.ca>
Thu, 19 Oct 2017 13:55:24 -0600
changeset 29393 c43f5499c52482498c955966200c02507e0b50b1
parent 29390 00904da56d345538e62da27458c308c275b10bde
child 29394 b66dc48ecfb5d95dfc4b876fb7ea2528eb62acdb
push id2078
push usermozilla@jorgk.com
push dateTue, 21 Nov 2017 23:28:47 +0000
treeherdercomm-beta@c43f5499c524 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal, jorgk
bugs1410475
Bug 1410475: Add support for detecting whether c-c is topdir in mozconfigs; r=mshal a=jorgk DONTBUILD MozReview-Commit-ID: KdakNqn2ETl
build/check-sync-exceptions
build/mozconfig.comm-support
--- 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