OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2009 Google Inc. All rights reserved. | 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Notes: | 7 # Notes: |
8 # | 8 # |
9 # This is all roughly based on the Makefile system used by the Linux | 9 # This is all roughly based on the Makefile system used by the Linux |
10 # kernel, but is a non-recursive make -- we put the entire dependency | 10 # kernel, but is a non-recursive make -- we put the entire dependency |
(...skipping 28 matching lines...) Expand all Loading... |
39 'SHARED_LIB_PREFIX': 'lib', | 39 'SHARED_LIB_PREFIX': 'lib', |
40 'STATIC_LIB_SUFFIX': '.a', | 40 'STATIC_LIB_SUFFIX': '.a', |
41 'SHARED_LIB_SUFFIX': '.so', | 41 'SHARED_LIB_SUFFIX': '.so', |
42 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/geni', | 42 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/geni', |
43 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen', | 43 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen', |
44 'PRODUCT_DIR': '$(builddir)', | 44 'PRODUCT_DIR': '$(builddir)', |
45 'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)', | 45 'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)', |
46 'LIB_DIR': '$(obj).$(TOOLSET)', | 46 'LIB_DIR': '$(obj).$(TOOLSET)', |
47 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python. | 47 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python. |
48 'RULE_INPUT_PATH': '$(abspath $<)', | 48 'RULE_INPUT_PATH': '$(abspath $<)', |
| 49 'RULE_INPUT_EXT': '$(suffix $<)', |
| 50 'RULE_INPUT_NAME': '$(notdir $<)', |
49 | 51 |
50 # These appear unused -- ??? | 52 # This appears unused --- ? |
51 'RULE_INPUT_EXT': 'XXXEXT$(suffix $^)', | |
52 'RULE_INPUT_NAME': 'XXXNAME$(notdir $(basename $^)0', | |
53 'CONFIGURATION_NAME': '$(BUILDTYPE)', | 53 'CONFIGURATION_NAME': '$(BUILDTYPE)', |
54 } | 54 } |
55 | 55 |
56 # Make supports multiple toolsets | 56 # Make supports multiple toolsets |
57 generator_supports_multiple_toolsets = True | 57 generator_supports_multiple_toolsets = True |
58 | 58 |
59 def ensure_directory_exists(path): | 59 def ensure_directory_exists(path): |
60 dir = os.path.dirname(path) | 60 dir = os.path.dirname(path) |
61 if dir and not os.path.exists(dir): | 61 if dir and not os.path.exists(dir): |
62 os.makedirs(dir) | 62 os.makedirs(dir) |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 ' '.join(map(Sourceify, build_files)), | 1125 ' '.join(map(Sourceify, build_files)), |
1126 gyp.common.EncodePOSIXShellList( | 1126 gyp.common.EncodePOSIXShellList( |
1127 [gyp.common.FixIfRelativePath(params['gyp_binary'], options.depth), | 1127 [gyp.common.FixIfRelativePath(params['gyp_binary'], options.depth), |
1128 '-fmake'] + | 1128 '-fmake'] + |
1129 gyp.RegenerateFlags(options) + | 1129 gyp.RegenerateFlags(options) + |
1130 build_files_args))) | 1130 build_files_args))) |
1131 | 1131 |
1132 root_makefile.write(SHARED_FOOTER) | 1132 root_makefile.write(SHARED_FOOTER) |
1133 | 1133 |
1134 root_makefile.close() | 1134 root_makefile.close() |
OLD | NEW |