OLD | NEW |
1 # Copyright (c) 2011 Google Inc. All rights reserved. | 1 # Copyright (c) 2011 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 """gypd output module | 5 """gypd output module |
6 | 6 |
7 This module produces gyp input as its output. Output files are given the | 7 This module produces gyp input as its output. Output files are given the |
8 .gypd extension to avoid overwriting the .gyp files that they are generated | 8 .gypd extension to avoid overwriting the .gyp files that they are generated |
9 from. Internal references to .gyp files (such as those found in | 9 from. Internal references to .gyp files (such as those found in |
10 "dependencies" sections) are not adjusted to point to .gypd files instead; | 10 "dependencies" sections) are not adjusted to point to .gypd files instead; |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 | 33 |
34 import gyp.common | 34 import gyp.common |
35 import errno | 35 import errno |
36 import os | 36 import os |
37 import pprint | 37 import pprint |
38 | 38 |
39 | 39 |
40 # These variables should just be spit back out as variable references. | 40 # These variables should just be spit back out as variable references. |
41 _generator_identity_variables = [ | 41 _generator_identity_variables = [ |
| 42 'CONFIGURATION_NAME', |
42 'EXECUTABLE_PREFIX', | 43 'EXECUTABLE_PREFIX', |
43 'EXECUTABLE_SUFFIX', | 44 'EXECUTABLE_SUFFIX', |
44 'INTERMEDIATE_DIR', | 45 'INTERMEDIATE_DIR', |
| 46 'LIB_DIR', |
45 'PRODUCT_DIR', | 47 'PRODUCT_DIR', |
46 'RULE_INPUT_ROOT', | 48 'RULE_INPUT_ROOT', |
47 'RULE_INPUT_DIRNAME', | 49 'RULE_INPUT_DIRNAME', |
48 'RULE_INPUT_EXT', | 50 'RULE_INPUT_EXT', |
49 'RULE_INPUT_NAME', | 51 'RULE_INPUT_NAME', |
50 'RULE_INPUT_PATH', | 52 'RULE_INPUT_PATH', |
51 'SHARED_INTERMEDIATE_DIR', | 53 'SHARED_INTERMEDIATE_DIR', |
| 54 'SHARED_LIB_DIR', |
52 ] | 55 ] |
53 | 56 |
54 # gypd doesn't define a default value for OS like many other generator | 57 # gypd doesn't define a default value for OS like many other generator |
55 # modules. Specify "-D OS=whatever" on the command line to provide a value. | 58 # modules. Specify "-D OS=whatever" on the command line to provide a value. |
56 generator_default_variables = { | 59 generator_default_variables = { |
57 } | 60 } |
58 | 61 |
59 # gypd supports multiple toolsets | 62 # gypd supports multiple toolsets |
60 generator_supports_multiple_toolsets = True | 63 generator_supports_multiple_toolsets = True |
61 | 64 |
(...skipping 16 matching lines...) Expand all Loading... |
78 input_file_stem = input_file[:-4] | 81 input_file_stem = input_file[:-4] |
79 output_file = input_file_stem + params['options'].suffix + '.gypd' | 82 output_file = input_file_stem + params['options'].suffix + '.gypd' |
80 | 83 |
81 if not output_file in output_files: | 84 if not output_file in output_files: |
82 output_files[output_file] = input_file | 85 output_files[output_file] = input_file |
83 | 86 |
84 for output_file, input_file in output_files.iteritems(): | 87 for output_file, input_file in output_files.iteritems(): |
85 output = open(output_file, 'w') | 88 output = open(output_file, 'w') |
86 pprint.pprint(data[input_file], output) | 89 pprint.pprint(data[input_file], output) |
87 output.close() | 90 output.close() |
OLD | NEW |