Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: pylib/gyp/generator/scons.py

Issue 115922: Add a generic way for generator info to get passed to input to affect process... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | pylib/gyp/generator/xcode.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | pylib/gyp/generator/xcode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698