summaryrefslogtreecommitdiffstats
path: root/build/moz.configure
diff options
context:
space:
mode:
Diffstat (limited to 'build/moz.configure')
-rw-r--r--build/moz.configure/init.configure43
1 files changed, 27 insertions, 16 deletions
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 713b2ce61..2e6034e8e 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -610,7 +610,7 @@ imply_option('--enable-project', application)
def default_project(build_env, help):
if build_env.topobjdir.endswith('/js/src'):
return 'js'
- return 'browser'
+ return 'application/xulrunner'
option('--enable-project', nargs=1, default=default_project,
help='Project to build')
@@ -618,28 +618,22 @@ option('--enable-project', nargs=1, default=default_project,
option('--with-external-source-dir', env='EXTERNAL_SOURCE_DIR', nargs=1,
help='External directory containing additional build files')
-@depends('--enable-project', '--with-external-source-dir',
- check_build_environment, '--help')
+@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
@imports(_from='os.path', _import='exists')
def include_project_configure(project, external_source_dir, build_env, help):
- if not project:
- die('--enable-project is required.')
-
base_dir = build_env.topsrcdir
+
if external_source_dir:
base_dir = os.path.join(base_dir, external_source_dir[0])
-
+
build_app = project[0]
- if not external_source_dir and build_app not in ('xulrunner', 'js'):
- die('Cannot find project %s', build_app)
-
path_project_src_dir_root = os.path.join(base_dir, build_app, 'moz.configure')
if exists(path_project_src_dir_root):
return path_project_src_dir_root
else:
- die('Cannot find project %s', build_app)
+ return os.path.join(build_env.topsrcdir, 'toolkit', 'moz.configure')
@depends('--with-external-source-dir')
def external_source_dir(value):
@@ -649,12 +643,29 @@ def external_source_dir(value):
set_config('EXTERNAL_SOURCE_DIR', external_source_dir)
add_old_configure_assignment('EXTERNAL_SOURCE_DIR', external_source_dir)
+@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
+@imports(_from='os.path', _import='exists')
+def build_project(project, external_source_dir, build_env, help):
+ if not project:
+ die('--enable-project is required.')
+
+ base_dir = build_env.topsrcdir
+
+ if external_source_dir:
+ base_dir = os.path.join(base_dir, external_source_dir[0])
+
+ build_app = project[0]
+
+ if not external_source_dir and build_app not in ('xulrunner', 'js'):
+ die('Cannot find project %s', build_app)
+
+ build_app_abspath = os.path.join(base_dir, build_app)
+
+ if exists(build_app_abspath):
+ return os.path.relpath(build_app_abspath, build_env.topsrcdir)
+ else:
+ die('Cannot find project %s', build_app)
-@depends(include_project_configure, check_build_environment, '--help')
-def build_project(include_project_configure, build_env, help):
- ret = os.path.dirname(os.path.relpath(include_project_configure,
- build_env.topsrcdir))
- return ret
set_config('MOZ_BUILD_APP', build_project)
set_define('MOZ_BUILD_APP', build_project)