OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import copy | 5 import copy |
6 import hashlib | 6 import hashlib |
7 import multiprocessing | 7 import multiprocessing |
8 import os.path | 8 import os.path |
9 import re | 9 import re |
10 import signal | 10 import signal |
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 cc_host = cc_host_global_setting.replace('$(CC)', cc) | 1414 cc_host = cc_host_global_setting.replace('$(CC)', cc) |
1415 if '$(CXX)' in cxx_host and cxx_host_global_setting: | 1415 if '$(CXX)' in cxx_host and cxx_host_global_setting: |
1416 cxx_host = cxx_host_global_setting.replace('$(CXX)', cxx) | 1416 cxx_host = cxx_host_global_setting.replace('$(CXX)', cxx) |
1417 master_ninja.variable('cc_host', cc_host) | 1417 master_ninja.variable('cc_host', cc_host) |
1418 master_ninja.variable('cxx_host', cxx_host) | 1418 master_ninja.variable('cxx_host', cxx_host) |
1419 if flavor == 'win': | 1419 if flavor == 'win': |
1420 master_ninja.variable('ld_host', ld_host) | 1420 master_ninja.variable('ld_host', ld_host) |
1421 else: | 1421 else: |
1422 master_ninja.variable('ld_host', flock + ' linker.lock ' + ld_host) | 1422 master_ninja.variable('ld_host', flock + ' linker.lock ' + ld_host) |
1423 | 1423 |
1424 if flavor == 'mac': | |
1425 master_ninja.variable('mac_tool', os.path.join('.', 'gyp-mac-tool')) | |
1426 master_ninja.newline() | 1424 master_ninja.newline() |
1427 | 1425 |
1428 if flavor != 'win': | 1426 if flavor != 'win': |
1429 master_ninja.rule( | 1427 master_ninja.rule( |
1430 'cc', | 1428 'cc', |
1431 description='CC $out', | 1429 description='CC $out', |
1432 command=('$cc -MMD -MF $out.d $defines $includes $cflags $cflags_c ' | 1430 command=('$cc -MMD -MF $out.d $defines $includes $cflags $cflags_c ' |
1433 '$cflags_pch_c -c $in -o $out'), | 1431 '$cflags_pch_c -c $in -o $out'), |
1434 depfile='$out.d') | 1432 depfile='$out.d') |
1435 master_ninja.rule( | 1433 master_ninja.rule( |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1649 command=('$ld $ldflags -o $out ' | 1647 command=('$ld $ldflags -o $out ' |
1650 '$in $solibs $libs$postbuilds')) | 1648 '$in $solibs $libs$postbuilds')) |
1651 master_ninja.rule( | 1649 master_ninja.rule( |
1652 'infoplist', | 1650 'infoplist', |
1653 description='INFOPLIST $out', | 1651 description='INFOPLIST $out', |
1654 command=('$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && ' | 1652 command=('$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && ' |
1655 'plutil -convert xml1 $out $out')) | 1653 'plutil -convert xml1 $out $out')) |
1656 master_ninja.rule( | 1654 master_ninja.rule( |
1657 'mac_tool', | 1655 'mac_tool', |
1658 description='MACTOOL $mactool_cmd $in', | 1656 description='MACTOOL $mactool_cmd $in', |
1659 command='$env $mac_tool $mactool_cmd $in $out') | 1657 command='$env ./gyp-mac-tool $mactool_cmd $in $out') |
1660 master_ninja.rule( | 1658 master_ninja.rule( |
1661 'package_framework', | 1659 'package_framework', |
1662 description='PACKAGE FRAMEWORK $out, POSTBUILDS', | 1660 description='PACKAGE FRAMEWORK $out, POSTBUILDS', |
1663 command='$mac_tool package-framework $out $version$postbuilds ' | 1661 command='./gyp-mac-tool package-framework $out $version$postbuilds ' |
1664 '&& touch $out') | 1662 '&& touch $out') |
1665 if flavor == 'win': | 1663 if flavor == 'win': |
1666 master_ninja.rule( | 1664 master_ninja.rule( |
1667 'stamp', | 1665 'stamp', |
1668 description='STAMP $out', | 1666 description='STAMP $out', |
1669 command='%s gyp-win-tool stamp $out' % sys.executable) | 1667 command='%s gyp-win-tool stamp $out' % sys.executable) |
1670 master_ninja.rule( | 1668 master_ninja.rule( |
1671 'copy', | 1669 'copy', |
1672 description='COPY $in $out', | 1670 description='COPY $in $out', |
1673 command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable) | 1671 command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 arglists.append( | 1778 arglists.append( |
1781 (target_list, target_dicts, data, params, config_name)) | 1779 (target_list, target_dicts, data, params, config_name)) |
1782 pool.map(CallGenerateOutputForConfig, arglists) | 1780 pool.map(CallGenerateOutputForConfig, arglists) |
1783 except KeyboardInterrupt, e: | 1781 except KeyboardInterrupt, e: |
1784 pool.terminate() | 1782 pool.terminate() |
1785 raise e | 1783 raise e |
1786 else: | 1784 else: |
1787 for config_name in config_names: | 1785 for config_name in config_names: |
1788 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1786 GenerateOutputForConfig(target_list, target_dicts, data, params, |
1789 config_name) | 1787 config_name) |
OLD | NEW |