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

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

Issue 307953002: msvs: Revert r1920 and add a test for excluded idl (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 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 | « no previous file | test/win/gyptest-midl-excluded.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 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 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 import copy 5 import copy
6 import ntpath 6 import ntpath
7 import os 7 import os
8 import posixpath 8 import posixpath
9 import re 9 import re
10 import subprocess 10 import subprocess
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 # (e.g. rule trigger ax_enums.idl is added to excluded_sources 826 # (e.g. rule trigger ax_enums.idl is added to excluded_sources
827 # because it's also in an action's inputs in the same project) 827 # because it's also in an action's inputs in the same project)
828 excluded_sources.discard(_FixPath(trigger_file)) 828 excluded_sources.discard(_FixPath(trigger_file))
829 # Done if not processing outputs as sources. 829 # Done if not processing outputs as sources.
830 if int(rule.get('process_outputs_as_sources', False)): 830 if int(rule.get('process_outputs_as_sources', False)):
831 inputs, outputs = _RuleInputsAndOutputs(rule, trigger_file) 831 inputs, outputs = _RuleInputsAndOutputs(rule, trigger_file)
832 inputs = OrderedSet(_FixPaths(inputs)) 832 inputs = OrderedSet(_FixPaths(inputs))
833 outputs = OrderedSet(_FixPaths(outputs)) 833 outputs = OrderedSet(_FixPaths(outputs))
834 inputs.remove(_FixPath(trigger_file)) 834 inputs.remove(_FixPath(trigger_file))
835 sources.update(inputs) 835 sources.update(inputs)
836 if spec['type'] != 'none' and not spec.get('msvs_external_builder'): 836 if not spec.get('msvs_external_builder'):
837 excluded_sources.update(inputs) 837 excluded_sources.update(inputs)
838 sources.update(outputs) 838 sources.update(outputs)
839 839
840 840
841 def _FilterActionsFromExcluded(excluded_sources, actions_to_add): 841 def _FilterActionsFromExcluded(excluded_sources, actions_to_add):
842 """Take inputs with actions attached out of the list of exclusions. 842 """Take inputs with actions attached out of the list of exclusions.
843 843
844 Arguments: 844 Arguments:
845 excluded_sources: list of source files not to be built. 845 excluded_sources: list of source files not to be built.
846 actions_to_add: dict of actions keyed on source file they're attached to. 846 actions_to_add: dict of actions keyed on source file they're attached to.
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 if not generator_flags.get('standalone'): 1385 if not generator_flags.get('standalone'):
1386 sources.add(gyp_file) 1386 sources.add(gyp_file)
1387 1387
1388 # Add in 'action' inputs and outputs. 1388 # Add in 'action' inputs and outputs.
1389 for a in spec.get('actions', []): 1389 for a in spec.get('actions', []):
1390 inputs = a['inputs'] 1390 inputs = a['inputs']
1391 inputs = [_NormalizedSource(i) for i in inputs] 1391 inputs = [_NormalizedSource(i) for i in inputs]
1392 # Add all inputs to sources and excluded sources. 1392 # Add all inputs to sources and excluded sources.
1393 inputs = OrderedSet(inputs) 1393 inputs = OrderedSet(inputs)
1394 sources.update(inputs) 1394 sources.update(inputs)
1395 if spec['type'] != 'none' and not spec.get('msvs_external_builder'): 1395 if not spec.get('msvs_external_builder'):
1396 excluded_sources.update(inputs) 1396 excluded_sources.update(inputs)
1397 if int(a.get('process_outputs_as_sources', False)): 1397 if int(a.get('process_outputs_as_sources', False)):
1398 _AddNormalizedSources(sources, a.get('outputs', [])) 1398 _AddNormalizedSources(sources, a.get('outputs', []))
1399 # Add in 'copies' inputs and outputs. 1399 # Add in 'copies' inputs and outputs.
1400 for cpy in spec.get('copies', []): 1400 for cpy in spec.get('copies', []):
1401 _AddNormalizedSources(sources, cpy.get('files', [])) 1401 _AddNormalizedSources(sources, cpy.get('files', []))
1402 return (sources, excluded_sources) 1402 return (sources, excluded_sources)
1403 1403
1404 1404
1405 def _AdjustSourcesAndConvertToFilterHierarchy( 1405 def _AdjustSourcesAndConvertToFilterHierarchy(
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 action_spec.extend( 3310 action_spec.extend(
3311 # TODO(jeanluc) 'Document' for all or just if as_sources? 3311 # TODO(jeanluc) 'Document' for all or just if as_sources?
3312 [['FileType', 'Document'], 3312 [['FileType', 'Document'],
3313 ['Command', command], 3313 ['Command', command],
3314 ['Message', description], 3314 ['Message', description],
3315 ['Outputs', outputs] 3315 ['Outputs', outputs]
3316 ]) 3316 ])
3317 if additional_inputs: 3317 if additional_inputs:
3318 action_spec.append(['AdditionalInputs', additional_inputs]) 3318 action_spec.append(['AdditionalInputs', additional_inputs])
3319 actions_spec.append(action_spec) 3319 actions_spec.append(action_spec)
OLDNEW
« no previous file with comments | « no previous file | test/win/gyptest-midl-excluded.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698