| Index: pylib/gyp/generator/scons.py
|
| diff --git a/pylib/gyp/generator/scons.py b/pylib/gyp/generator/scons.py
|
| index 7ac685f1bcfa134235439909a16d4de8517b8b61..9a4a8180e249961885b350835cc8c81106b86f81 100644
|
| --- a/pylib/gyp/generator/scons.py
|
| +++ b/pylib/gyp/generator/scons.py
|
| @@ -464,7 +464,6 @@ def GenerateSConscript(output_filename, spec, build_file, build_file_data):
|
| rules = spec.get('rules', [])
|
| for rule in rules:
|
| name = rule['rule_name'].translate(string.maketrans(' ()-', '____'))
|
| - a = ['cd', src_subdir, '&&'] + rule['action']
|
| message = rule.get('message')
|
| if message:
|
| message = repr(message)
|
| @@ -474,6 +473,10 @@ def GenerateSConscript(output_filename, spec, build_file, build_file_data):
|
| poas_line = '_processed_input_files.append(infile)'
|
| inputs = [FixPath(f, src_subdir_) for f in rule.get('inputs', [])]
|
| outputs = [FixPath(f, src_subdir_) for f in rule.get('outputs', [])]
|
| + # Skip a rule with no action and no inputs.
|
| + if 'action' not in rule and not rule.get('rule_sources', []):
|
| + continue
|
| + a = ['cd', src_subdir, '&&'] + rule['action']
|
| fp.write(_rule_template % {
|
| 'inputs' : pprint.pformat(inputs),
|
| 'outputs' : pprint.pformat(outputs),
|
|
|