Bug 1257468 - Replace tests on BUILDING_JS with tests on MOZ_BUILD_APP==js
Now that MOZ_BUILD_APP is set to js when building js/src, we can
distinguish those builds with MOZ_BUILD_APP==js instead of BUILDING_JS.
Consequently, remove BUILDING_JS.
--- a/build/autoconf/ffi.m4
+++ b/build/autoconf/ffi.m4
@@ -18,17 +18,17 @@ if test -n "$MOZ_SYSTEM_FFI"; then
fi
fi
AC_SUBST(MOZ_SYSTEM_FFI)
])
AC_DEFUN([MOZ_SUBCONFIGURE_FFI], [
-if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
+if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
if test "$BUILD_CTYPES" -a -z "$MOZ_SYSTEM_FFI"; then
# Run the libffi 'configure' script.
ac_configure_args="--disable-shared --enable-static --disable-raw-api"
if test "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --enable-debug"
fi
if test "$DSO_PIC_CFLAGS"; then
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -123,17 +123,17 @@ if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM
AC_DEFINE(U_USING_ICU_NAMESPACE,0)
fi
])
AC_DEFUN([MOZ_SUBCONFIGURE_ICU], [
-if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
+if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
# Set ICU compile options
ICU_CPPFLAGS=""
# don't use icu namespace automatically in client code
ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_USING_ICU_NAMESPACE=0"
# don't include obsolete header files
ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
--- a/build/autoconf/jemalloc.m4
+++ b/build/autoconf/jemalloc.m4
@@ -1,15 +1,15 @@
dnl This Source Code Form is subject to the terms of the Mozilla Public
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
AC_DEFUN([MOZ_SUBCONFIGURE_JEMALLOC], [
-if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
+if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
# Run jemalloc configure script
if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind"
# We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c
# on Windows, so just export memalign on all platforms.
ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes"
--- a/build/autoconf/nspr-build.m4
+++ b/build/autoconf/nspr-build.m4
@@ -3,21 +3,21 @@ dnl License, v. 2.0. If a copy of the MP
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
AC_DEFUN([MOZ_CONFIG_NSPR], [
ifelse([$1],,define(CONFIGURING_JS,yes))
dnl Possible ways this can be called:
dnl from toplevel configure:
-dnl JS_STANDALONE= BUILDING_JS=
+dnl JS_STANDALONE= MOZ_BUILD_APP!=js
dnl from js/src/configure invoked by toplevel configure:
-dnl JS_STANDALONE= BUILDING_JS=1
+dnl JS_STANDALONE= MOZ_BUILD_APP=js
dnl from standalone js/src/configure:
-dnl JS_STANDALONE=1 BUILDING_JS=1
+dnl JS_STANDALONE=1 MOZ_BUILD_APP=js
dnl ========================================================
dnl = Find the right NSPR to use.
dnl ========================================================
MOZ_ARG_WITH_STRING(nspr-cflags,
[ --with-nspr-cflags=FLAGS
Pass FLAGS to CC when building code that uses NSPR.
Use this when there's no accurate nspr-config
@@ -33,17 +33,17 @@ MOZ_ARG_WITH_STRING(nspr-libs,
ifdef([CONFIGURING_JS],[
MOZ_ARG_ENABLE_BOOL(nspr-build,
[ --enable-nspr-build Build NSPR from source tree],
MOZ_BUILD_NSPR=1,
MOZ_BUILD_NSPR=)
])
-if test -z "$BUILDING_JS" || test -n "$JS_STANDALONE"; then
+if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
_IS_OUTER_CONFIGURE=1
fi
MOZ_ARG_WITH_BOOL(system-nspr,
[ --with-system-nspr Use an NSPR that is already built and installed.
Use the 'nspr-config' script in the current path,
or look for the script in the directories given with
--with-nspr-exec-prefix or --with-nspr-prefix.
@@ -94,17 +94,17 @@ fi
if test "$JS_POSIX_NSPR" = unset; then
JS_POSIX_NSPR=
else
nspr_opts="x$nspr_opts"
which_nspr="posix-wrapper"
fi
if test -z "$nspr_opts"; then
- if test -z "$BUILDING_JS"; then
+ if test "$MOZ_BUILD_APP" != js; then
dnl Toplevel configure defaults to using nsprpub from the source tree
MOZ_BUILD_NSPR=1
which_nspr="source-tree"
else
dnl JS configure defaults to emulated NSPR if available, falling back
dnl to nsprpub.
JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT"
if test -z "$JS_POSIX_NSPR"; then
@@ -119,17 +119,17 @@ fi
if test -z "$nspr_opts" || test "$nspr_opts" = x; then
AC_MSG_RESULT($which_nspr)
else
AC_MSG_ERROR([only one way of using NSPR may be selected. See 'configure --help'.])
fi
AC_SUBST(MOZ_BUILD_NSPR)
-if test -n "$BUILDING_JS"; then
+if test "$MOZ_BUILD_APP" = js; then
if test "$JS_POSIX_NSPR" = 1; then
AC_DEFINE(JS_POSIX_NSPR)
fi
AC_SUBST(JS_POSIX_NSPR)
fi
# A (sub)configure invoked by the toplevel configure will always receive
# --with-nspr-libs on the command line. It will never need to figure out
--- a/configure.py
+++ b/configure.py
@@ -53,28 +53,28 @@ def config_status(config):
fh.write('true, false, null = True, False, None\n')
for k, v in sanitized_config.iteritems():
fh.write('%s = ' % k)
json.dump(v, fh, sort_keys=True, indent=4, ensure_ascii=False)
fh.write('\n')
fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', "
"'non_global_defines', 'substs']")
- if not config.get('BUILDING_JS') or config.get('JS_STANDALONE'):
+ if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
fh.write('''
if __name__ == '__main__':
args = dict([(name, globals()[name]) for name in __all__])
from mozbuild.config_status import config_status
config_status(**args)
''')
# Other things than us are going to run this file, so we need to give it
# executable permissions.
os.chmod('config.status', 0755)
- if not config.get('BUILDING_JS') or config.get('JS_STANDALONE'):
+ if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
if not config.get('JS_STANDALONE'):
os.environ['WRITE_MOZINFO'] = '1'
# Until we have access to the virtualenv from this script, execute
# config.status externally, with the virtualenv python.
return subprocess.call([config['PYTHON'], 'config.status'])
return 0
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -80,18 +80,16 @@ if test "$JS_STANDALONE" = no; then
JS_STANDALONE=
#DIST is exported from top-level configure
else
JS_STANDALONE=1
AC_DEFINE(JS_STANDALONE)
DIST="$MOZ_BUILD_ROOT/dist"
fi
AC_SUBST(JS_STANDALONE)
-BUILDING_JS=1
-AC_SUBST(BUILDING_JS)
AC_SUBST(autoconfmk)
MOZ_ARG_WITH_STRING(gonk-toolchain-prefix,
[ --with-gonk-toolchain-prefix=DIR
prefix to gonk toolchain commands],
gonk_toolchain_prefix=$withval)
if test -n "$gonkdir" ; then