Bug 1255305 - Move the function finding a shell from old.configure to init.configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 11 Mar 2016 22:52:40 +0900
changeset 288650 fc98436187af3e5b75fadfd1acd31fbcce9cd839
parent 288649 0f34a2f4714e35f077029bd7883fdc3dd38af9a8
child 288651 3e4385286eb106034afed28a43bad15134dee2d2
push id18174
push usercbook@mozilla.com
push dateTue, 15 Mar 2016 09:44:58 +0000
treeherderfx-team@dd0baa33759d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1255305
milestone48.0a1
Bug 1255305 - Move the function finding a shell from old.configure to init.configure. r=chmanchester
build/moz.configure/init.configure
build/moz.configure/old.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -228,19 +228,35 @@ def mozconfig_options(mozconfig):
         # but at the moment, moz.configure has no knowledge of the options
         # that may appear there. We'll opt-in when we move things from
         # old-configure.in, which will be tedious but necessary until we
         # can discriminate what old-configure.in supports.
 
 del command_line_helper
 
 
+# Mozilla-Build
+# ==============================================================
 option(env='MOZILLABUILD', nargs=1,
        help='Path to Mozilla Build (Windows-only)')
 
+# It feels dirty replicating this from python/mozbuild/mozbuild/mozconfig.py,
+# but the end goal being that the configure script would go away...
+@depends('MOZILLABUILD')
+@advanced
+def shell(mozillabuild):
+    import sys
+
+    shell = 'sh'
+    if mozillabuild:
+        shell = mozillabuild[0] + '/msys/bin/sh'
+    if sys.platform == 'win32':
+        shell = shell + '.exe'
+    return shell
+
 
 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'))
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -1,29 +1,14 @@
 # -*- 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/.
 
-# It feels dirty replicating this from python/mozbuild/mozbuild/mozconfig.py,
-# but the end goal being that the configure script would go away...
-@depends('MOZILLABUILD')
-@advanced
-def shell(mozillabuild):
-    import sys
-
-    shell = 'sh'
-    if mozillabuild:
-        shell = mozillabuild[0] + '/msys/bin/sh'
-    if sys.platform == 'win32':
-        shell = shell + '.exe'
-    return shell
-
-
 @template
 @advanced
 def encoded_open(path, mode):
     import codecs
     import sys
     encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
     return codecs.open(path, mode, encoding)