From 36f73c8cd27e62cbd3e85939d6fe11a240e3416f Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 3 Feb 2018 08:23:51 -0500 Subject: Allow moz.configure to build projects at / or application/ without having to fully qualify the path in --enable-application --- build/moz.configure/init.configure | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'build/moz.configure/init.configure') 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): -- cgit v1.2.3