cros-constants: allow build systems to override this

If we want to build outside of the chroot, we need to be able to point
the root source code somewhere else.

BUG=b:20895978
TEST=precq passes

Change-Id: Ifeab2d60b29a06c0b84d0a6e113d0bfe5eed19a5
Reviewed-on: https://chromium-review.googlesource.com/275109
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/eclass/cros-constants.eclass b/eclass/cros-constants.eclass
index 2e31dec..991d7bb 100644
--- a/eclass/cros-constants.eclass
+++ b/eclass/cros-constants.eclass
@@ -30,7 +30,11 @@
 # @ECLASS-VARIABLE: CHROOT_SOURCE_ROOT
 # @DESCRIPTION:
 # Path to location of source code in the chroot.
-CHROOT_SOURCE_ROOT='/mnt/host/source'
+# Ebuilds should not override this.  It is controllable so the overall build
+# system can redirect to a different location.  For example, using portage
+# prefix allows building without a chroot in which case this path as-is would
+# never work.
+: ${CHROOT_SOURCE_ROOT:='/mnt/host/source'}
 
 # @ECLASS-VARIABLE: CHROMITE_DIR
 # @DESCRIPTION: