Bug 1259620 - Add @checking to host and target to display the triplets. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 24 Mar 2016 18:37:03 +0900
changeset 344613 01d9598756e6d79d0f55d982828bed3e5382fd75
parent 344612 639594980ee1d2fbea4d1cbcd5da54950e5d8fc6
child 517002 624c46db4d64c3b5ef18bb1bf2daff1bed211183
push id13878
push userbmo:mh+mozilla@glandium.org
push dateThu, 24 Mar 2016 23:30:01 +0000
reviewersgps
bugs1259620
milestone48.0a1
Bug 1259620 - Add @checking to host and target to display the triplets. r?gps
build/moz.configure/init.configure
moz.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1,15 +1,16 @@
 # -*- 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('util.configure')
+include('checks.configure')
 
 option(env='DIST', nargs=1, help='DIST directory')
 
 # Do not allow objdir == srcdir builds.
 # ==============================================================
 @depends('--help', 'DIST')
 def check_build_environment(help, dist):
     topobjdir = os.path.realpath(os.path.abspath('.'))
@@ -459,30 +460,32 @@ def split_triplet(triplet):
 def config_sub(shell, triplet):
     import subprocess
     config_sub = os.path.join(os.path.dirname(__file__), '..',
                               'autoconf', 'config.sub')
     return subprocess.check_output([shell, config_sub, triplet]).strip()
 
 
 @depends('--host', shell)
+@checking('for host system type', lambda h: h.alias)
 @advanced
 def host(value, shell):
     if not value:
         import subprocess
         config_guess = os.path.join(os.path.dirname(__file__), '..',
                                     'autoconf', 'config.guess')
         host = subprocess.check_output([shell, config_guess]).strip()
     else:
         host = value[0]
 
     return split_triplet(config_sub(shell, host))
 
 
 @depends('--target', host, shell)
+@checking('for target system type', lambda t: t.alias)
 def target(value, host, shell):
     if not value:
         return host
     return split_triplet(config_sub(shell, value[0]))
 
 
 @depends(host, target)
 def host_and_target_for_old_configure(host, target):
--- a/moz.configure
+++ b/moz.configure
@@ -1,16 +1,15 @@
 # -*- 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('build/moz.configure/init.configure')
-include('build/moz.configure/checks.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.