build/buildconfig.py
author Ryan VanderMeulen <ryanvm@gmail.com>
Fri, 26 Aug 2016 09:37:03 -0400
changeset 311374 a65b35c8e5b17c2585968974aef1da67a8c56642
parent 301950 a2e4369f86dcf620b453de3da6525a87ea1808fc
permissions -rw-r--r--
Merge inbound to m-c. a=merge

# 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/.

import os
import sys
from mozbuild.base import MozbuildObject

config = MozbuildObject.from_environment()

for var in ('topsrcdir', 'topobjdir', 'defines', 'non_global_defines',
            'substs'):
    value = getattr(config, var)
    setattr(sys.modules[__name__], var, value)

substs = dict(substs)

for var in os.environ:
    if var != 'SHELL' and var in substs:
        substs[var] = os.environ[var]