diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-18 19:34:29 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-18 19:34:29 -0400 |
commit | 7fc868a368467458db559d694769eb5b4bdf4324 (patch) | |
tree | 74c099675d5b5b4ca42863e4946b6c3537100dc6 /build/moz.configure/init.configure | |
parent | 1bc8205ee11f371d6cb2b4f18116ae2e24206a4c (diff) | |
download | UXP-7fc868a368467458db559d694769eb5b4bdf4324.tar UXP-7fc868a368467458db559d694769eb5b4bdf4324.tar.gz UXP-7fc868a368467458db559d694769eb5b4bdf4324.tar.lz UXP-7fc868a368467458db559d694769eb5b4bdf4324.tar.xz UXP-7fc868a368467458db559d694769eb5b4bdf4324.zip |
Make application moz.configure file optional and set application/xulrunner as the default platform build_app
Diffstat (limited to 'build/moz.configure/init.configure')
-rw-r--r-- | build/moz.configure/init.configure | 43 |
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) |