Bug 1251324 - Add a --disable-js-shell option to js/src/configure draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 09 Mar 2016 15:27:42 +0900
changeset 338578 909523a8d7b4966e030116a0e724f9ea76e281a9
parent 338470 46c483f01b22e495d6949c9a9ece1d011bce7ca5
child 338716 82e4532966b9f7441a6c756ed03cf83d92691cc7
push id12533
push userbmo:mh+mozilla@glandium.org
push dateWed, 09 Mar 2016 12:06:45 +0000
bugs1251324
milestone48.0a1
Bug 1251324 - Add a --disable-js-shell option to js/src/configure
js/moz.configure
js/src/moz.build
js/src/old-configure.in
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -1,5 +1,12 @@
 # -*- 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/.
+
+option('--disable-js-shell', help='Do not build the JS shell')
+
+@depends('--disable-js-shell')
+def js_shell(value):
+    if not value:
+        set_config('JS_DISABLE_SHELL', '1')
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -48,17 +48,16 @@ with Files('builtin/make_intl_data.py'):
 
 with Files('../public/TrackedOptimizationInfo.h'):
     BUG_COMPONENT = component_jit
 
 
 if CONFIG['JS_BUNDLED_EDITLINE']:
     DIRS += ['editline']
 
-# editline needs to get built before the shell
 if not CONFIG['JS_DISABLE_SHELL']:
     DIRS += ['shell']
 
 TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']
 
 CONFIGURE_SUBST_FILES += [
     'devtools/rootAnalysis/Makefile',
     'js-config',
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -3268,17 +3268,16 @@ dnl = Link js shell to system readline
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(readline,
 [  --enable-readline       Link js shell to system readline library],
     JS_WANT_READLINE=1,
     JS_WANT_READLINE= )
 
 JS_BUNDLED_EDITLINE=
 EDITLINE_LIBS=
-JS_DISABLE_SHELL=
 
 case "$target" in
 *-mingw*)
     NO_EDITLINE=1
     ;;
 *)
     ;;
 esac
@@ -3292,17 +3291,16 @@ if test -z "$SKIP_LIBRARY_CHECKS" -a -z 
     dnl By default, we use editline
     JS_BUNDLED_EDITLINE=1
   fi
 
   dnl Either way, we want to build with line editing support.
   AC_DEFINE(EDITLINE)
 fi
 AC_SUBST(JS_BUNDLED_EDITLINE)
-AC_SUBST(JS_DISABLE_SHELL)
 AC_SUBST_LIST(EDITLINE_LIBS)
 
 dnl ========================================================
 dnl =
 dnl = Standalone module options
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla))