summaryrefslogtreecommitdiffstats
path: root/build/moz.configure
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 08:23:51 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 08:23:51 -0500
commit36f73c8cd27e62cbd3e85939d6fe11a240e3416f (patch)
tree7aef7b3f6216792a865330697000556eddef0ce3 /build/moz.configure
parent7239cc8c7e9c140be6858c659d942f6d71283531 (diff)
downloadUXP-36f73c8cd27e62cbd3e85939d6fe11a240e3416f.tar
UXP-36f73c8cd27e62cbd3e85939d6fe11a240e3416f.tar.gz
UXP-36f73c8cd27e62cbd3e85939d6fe11a240e3416f.tar.lz
UXP-36f73c8cd27e62cbd3e85939d6fe11a240e3416f.tar.xz
UXP-36f73c8cd27e62cbd3e85939d6fe11a240e3416f.zip
Allow moz.configure to build projects at / or application/ without having to fully qualify the path in --enable-application
Diffstat (limited to 'build/moz.configure')
-rw-r--r--build/moz.configure/init.configure19
1 files changed, 15 insertions, 4 deletions
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 2123bebc9..5f7e9b3ee 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -605,10 +605,21 @@ def include_project_configure(project, external_source_dir, build_env, help):
if external_source_dir:
base_dir = os.path.join(base_dir, external_source_dir[0])
- path = os.path.join(base_dir, project[0], 'moz.configure')
- if not exists(path):
- die('Cannot find project %s', project[0])
- return path
+ build_app = project[0]
+
+ # Uncomment when browser becomes application/basilisk
+ #if build_app == 'browser':
+ #die('The project "browser" is no longer valid. Perhaps you meant "basilisk" or "palemoon"?')
+
+ path_project_src_dir_application = os.path.join(base_dir, 'application/' + build_app, 'moz.configure')
+ path_project_src_dir_root = os.path.join(base_dir, build_app, 'moz.configure')
+
+ if exists(path_project_src_dir_application):
+ return path_project_src_dir_application
+ elif exists(path_project_src_dir_root):
+ return path_project_src_dir_root
+ else:
+ die('Cannot find project %s', build_app)
@depends('--with-external-source-dir')
def external_source_dir(value):