| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 | 3 |
| 4 import gyp | 4 import gyp |
| 5 import gyp.common | 5 import gyp.common |
| 6 # TODO(sgk): create a separate "project module" for SCons? | 6 # TODO(sgk): create a separate "project module" for SCons? |
| 7 #import gyp.SCons as SCons | 7 #import gyp.SCons as SCons |
| 8 import os.path | 8 import os.path |
| 9 import pprint | 9 import pprint |
| 10 import re | 10 import re |
| 11 | 11 |
| 12 | 12 |
| 13 generator_default_variables = { | 13 generator_default_variables = { |
| 14 'EXECUTABLE_PREFIX': '', | 14 'EXECUTABLE_PREFIX': '', |
| 15 'EXECUTABLE_SUFFIX': '', | 15 'EXECUTABLE_SUFFIX': '', |
| 16 'INTERMEDIATE_DIR': '$OBJ_DIR/$COMPONENT_NAME/$TARGET_NAME/intermediate', | 16 'INTERMEDIATE_DIR': '$OBJ_DIR/$COMPONENT_NAME/$TARGET_NAME/intermediate', |
| 17 'SHARED_INTERMEDIATE_DIR': '$OBJ_DIR/global_intermediate', | 17 'SHARED_INTERMEDIATE_DIR': '$OBJ_DIR/global_intermediate', |
| 18 'OS': 'linux', | 18 'OS': 'linux', |
| 19 'PRODUCT_DIR': '$TOP_BUILDDIR', | 19 'PRODUCT_DIR': '$TOP_BUILDDIR', |
| 20 'RULE_INPUT_ROOT': '${SOURCE.filebase}', | 20 'RULE_INPUT_ROOT': '${SOURCE.filebase}', |
| 21 'RULE_INPUT_EXT': '${SOURCE.suffix}', | 21 'RULE_INPUT_EXT': '${SOURCE.suffix}', |
| 22 'RULE_INPUT_NAME': '${SOURCE.file}', | 22 'RULE_INPUT_NAME': '${SOURCE.file}', |
| 23 'RULE_INPUT_PATH': '${SOURCE}', | 23 'RULE_INPUT_PATH': '${SOURCE}', |
| 24 } | 24 } |
| 25 | 25 |
| 26 generator_handles_variants = True |
| 26 | 27 |
| 27 header = """\ | 28 header = """\ |
| 28 # This file is generated; do not edit. | 29 # This file is generated; do not edit. |
| 29 """ | 30 """ |
| 30 | 31 |
| 31 | 32 |
| 32 def WriteList(fp, list, prefix='', | 33 def WriteList(fp, list, prefix='', |
| 33 separator=',\n ', | 34 separator=',\n ', |
| 34 preamble=None, | 35 preamble=None, |
| 35 postamble=None): | 36 postamble=None): |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 if target_dicts[t]['type'] == 'settings': | 775 if target_dicts[t]['type'] == 'settings': |
| 775 continue | 776 continue |
| 776 bf, target = gyp.common.BuildFileAndTarget('', t)[:2] | 777 bf, target = gyp.common.BuildFileAndTarget('', t)[:2] |
| 777 target_filename = TargetFilename(target, bf, options.suffix) | 778 target_filename = TargetFilename(target, bf, options.suffix) |
| 778 tpath = gyp.common.RelativePath(target_filename, output_dir) | 779 tpath = gyp.common.RelativePath(target_filename, output_dir) |
| 779 sconscript_files[target] = tpath | 780 sconscript_files[target] = tpath |
| 780 | 781 |
| 781 if sconscript_files: | 782 if sconscript_files: |
| 782 GenerateSConscriptWrapper(data[build_file], basename, | 783 GenerateSConscriptWrapper(data[build_file], basename, |
| 783 output_filename, sconscript_files) | 784 output_filename, sconscript_files) |
| OLD | NEW |