| Index: pylib/gyp/generator/ninja.py
|
| ===================================================================
|
| --- pylib/gyp/generator/ninja.py (revision 1452)
|
| +++ pylib/gyp/generator/ninja.py (working copy)
|
| @@ -1198,6 +1198,7 @@
|
| global generator_additional_path_sections
|
| cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc'))
|
| flavor = gyp.common.GetFlavor(params)
|
| + default_variables.setdefault('HOST_OS', gyp.common.GetHostFlavor(params))
|
| if flavor == 'mac':
|
| default_variables.setdefault('OS', 'mac')
|
| default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
|
| @@ -1271,6 +1272,7 @@
|
| config_name):
|
| options = params['options']
|
| flavor = gyp.common.GetFlavor(params)
|
| + host_flavor = gyp.common.GetHostFlavor(params)
|
| generator_flags = params.get('generator_flags', {})
|
|
|
| # build_dir: relative path from source root to our output files.
|
| @@ -1285,7 +1287,7 @@
|
| width=120)
|
|
|
| # Put build-time support tools in out/{config_name}.
|
| - gyp.common.CopyTool(flavor, toplevel_build)
|
| + gyp.common.CopyTool(host_flavor, toplevel_build)
|
|
|
| # Grab make settings for CC/CXX.
|
| if flavor == 'win':
|
| @@ -1302,7 +1304,7 @@
|
| if key == 'CXX': cxx = os.path.join(build_to_root, value)
|
|
|
| flock = 'flock'
|
| - if flavor == 'mac':
|
| + if host_flavor == 'mac':
|
| flock = './gyp-mac-tool flock'
|
| master_ninja.variable('cc', os.environ.get('CC', cc))
|
| master_ninja.variable('cxx', os.environ.get('CXX', cxx))
|
| @@ -1326,7 +1328,7 @@
|
| else:
|
| master_ninja.variable('ld_target', flock + ' linker.lock $cxx_target')
|
|
|
| - if flavor == 'mac':
|
| + if host_flavor == 'mac':
|
| master_ninja.variable('mac_tool', os.path.join('.', 'gyp-mac-tool'))
|
| master_ninja.newline()
|
|
|
| @@ -1551,14 +1553,17 @@
|
| command=('$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && '
|
| 'plutil -convert xml1 $out $out'))
|
| master_ninja.rule(
|
| - 'mac_tool',
|
| - description='MACTOOL $mactool_cmd $in',
|
| - command='$env $mac_tool $mactool_cmd $in $out')
|
| - master_ninja.rule(
|
| 'package_framework',
|
| description='PACKAGE FRAMEWORK $out, POSTBUILDS',
|
| command='$mac_tool package-framework $out $version$postbuilds '
|
| '&& touch $out')
|
| +
|
| + if host_flavor == 'mac':
|
| + master_ninja.rule(
|
| + 'mac_tool',
|
| + description='MACTOOL $mactool_cmd $in',
|
| + command='$env $mac_tool $mactool_cmd $in $out')
|
| +
|
| if flavor == 'win':
|
| master_ninja.rule(
|
| 'stamp',
|
|
|