mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester
Because --enable-application is the current way to do things, transpose it to configure.py, but since --enable-application=js doesn't make sense, make it an alias of a new --enable-project option. This only partially moves --enable-application out of old-configure.in because there are a lot of other things intertwined with it.
This commit is contained in:
parent
9a43697d65
commit
564de8ea0e
7
b2g/dev/moz.configure
Normal file
7
b2g/dev/moz.configure
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('../../toolkit/moz.configure')
|
7
b2g/graphene/moz.configure
Normal file
7
b2g/graphene/moz.configure
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('../../toolkit/moz.configure')
|
7
b2g/moz.configure
Normal file
7
b2g/moz.configure
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('../toolkit/moz.configure')
|
7
browser/moz.configure
Normal file
7
browser/moz.configure
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('../toolkit/moz.configure')
|
@ -198,3 +198,38 @@ del command_line_helper
|
||||
|
||||
option(env='MOZILLABUILD', nargs=1,
|
||||
help='Path to Mozilla Build (Windows-only)')
|
||||
|
||||
|
||||
option('--enable-application', nargs=1, env='MOZ_BUILD_APP',
|
||||
help='Application to build. Same as --enable-project.')
|
||||
|
||||
@depends('--enable-application', '--help')
|
||||
def application(app, help):
|
||||
if app:
|
||||
imply_option(app.format('--enable-project'))
|
||||
|
||||
|
||||
@depends(check_build_environment, '--help')
|
||||
def default_project(build_env, help):
|
||||
if build_env['TOPOBJDIR'].endswith('/js/src'):
|
||||
return 'js'
|
||||
return 'browser'
|
||||
|
||||
option('--enable-project', nargs=1, default=default_project,
|
||||
help='Project to build')
|
||||
|
||||
@depends('--enable-project', check_build_environment, '--help')
|
||||
def include_project_configure(project, build_env, help):
|
||||
if not project:
|
||||
error('--enable-project is required.')
|
||||
|
||||
path = os.path.join(build_env['TOPSRCDIR'], project[0], 'moz.configure')
|
||||
if not os.path.exists(path):
|
||||
error('Cannot find project %s' % project[0])
|
||||
return path
|
||||
|
||||
include(include_project_configure)
|
||||
|
||||
@depends('--enable-project')
|
||||
def build_app(project):
|
||||
return project[0]
|
||||
|
@ -60,10 +60,10 @@ def autoconf(mozconfig, autoconf):
|
||||
option(env='OLD_CONFIGURE', nargs=1, help='Path to the old configure script')
|
||||
|
||||
@depends('OLD_CONFIGURE', mozconfig, autoconf, check_build_environment, shell,
|
||||
virtualenv_python, compile_environment)
|
||||
virtualenv_python, compile_environment, build_app)
|
||||
@advanced
|
||||
def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
|
||||
python, compile_env):
|
||||
python, compile_env, build_app):
|
||||
import glob
|
||||
import itertools
|
||||
import subprocess
|
||||
@ -126,6 +126,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
|
||||
print('PYTHON=%s' % quote(python), file=out)
|
||||
if compile_env:
|
||||
print('COMPILE_ENVIRONMENT=1', file=out)
|
||||
print('MOZ_BUILD_APP=%s' % build_app, file=out)
|
||||
|
||||
return cmd
|
||||
|
||||
@ -150,7 +151,6 @@ def old_configure_options(*options):
|
||||
'--enable-android-apz',
|
||||
'--enable-android-omx',
|
||||
'--enable-android-resource-constrained',
|
||||
'--enable-application',
|
||||
'--enable-approximate-location',
|
||||
'--enable-b2g-bt',
|
||||
'--enable-b2g-camera',
|
||||
|
5
embedding/ios/moz.configure
Normal file
5
embedding/ios/moz.configure
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
5
extensions/moz.configure
Normal file
5
extensions/moz.configure
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
5
js/moz.configure
Normal file
5
js/moz.configure
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
@ -21,4 +21,6 @@ SRCDIR=$(dirname $0)
|
||||
TOPSRCDIR="$SRCDIR"/../..
|
||||
export OLD_CONFIGURE="$SRCDIR"/old-configure
|
||||
|
||||
set -- "$@" --enable-project=js
|
||||
|
||||
which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
|
||||
|
7
mobile/android/b2gdroid/moz.configure
Normal file
7
mobile/android/b2gdroid/moz.configure
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('../../../toolkit/moz.configure')
|
7
mobile/android/moz.configure
Normal file
7
mobile/android/moz.configure
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('../../toolkit/moz.configure')
|
@ -6,6 +6,13 @@
|
||||
|
||||
include('build/moz.configure/init.configure')
|
||||
|
||||
# Note:
|
||||
# - Gecko-specific options and rules should go in toolkit/moz.configure.
|
||||
# - Firefox-specific options and rules should go in browser/moz.configure.
|
||||
# - Fennec-specific options and rules should go in
|
||||
# mobile/android/moz.configure.
|
||||
# - Spidermonkey-specific options and rules should go in js/moz.configure.
|
||||
# - etc.
|
||||
|
||||
option('--enable-artifact-builds', env='MOZ_ARTIFACT_BUILDS',
|
||||
help='Download and use prebuilt binary artifacts.')
|
||||
|
@ -3689,14 +3689,6 @@ MOZ_ARG_WITH_STRING(external-source-dir,
|
||||
[ EXTERNAL_SOURCE_DIR=$withval])
|
||||
AC_SUBST(EXTERNAL_SOURCE_DIR)
|
||||
|
||||
MOZ_ARG_ENABLE_STRING(application,
|
||||
[ --enable-application=APP
|
||||
Options include:
|
||||
browser (Firefox)
|
||||
xulrunner
|
||||
tools/update-packaging (AUS-related packaging tools)],
|
||||
[ MOZ_BUILD_APP=$enableval ] )
|
||||
|
||||
MOZ_ARG_WITH_STRING(xulrunner-stub-name,
|
||||
[ --with-xulrunner-stub-name=appname Create the xulrunner stub with the given name],
|
||||
XULRUNNER_STUB_NAME=$withval)
|
||||
|
5
toolkit/moz.configure
Normal file
5
toolkit/moz.configure
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
Loading…
Reference in New Issue
Block a user