| OLD | NEW |
| 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 from compiler.ast import Const | 5 from compiler.ast import Const |
| 6 from compiler.ast import Dict | 6 from compiler.ast import Dict |
| 7 from compiler.ast import Discard | 7 from compiler.ast import Discard |
| 8 from compiler.ast import List | 8 from compiler.ast import List |
| 9 from compiler.ast import Module | 9 from compiler.ast import Module |
| 10 from compiler.ast import Node | 10 from compiler.ast import Node |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 output = ExpandVariables(output, phase, variables, build_file) | 806 output = ExpandVariables(output, phase, variables, build_file) |
| 807 | 807 |
| 808 # Convert all strings that are canonically-represented integers into integers. | 808 # Convert all strings that are canonically-represented integers into integers. |
| 809 if isinstance(output, list): | 809 if isinstance(output, list): |
| 810 for index in xrange(0, len(output)): | 810 for index in xrange(0, len(output)): |
| 811 if IsStrCanonicalInt(output[index]): | 811 if IsStrCanonicalInt(output[index]): |
| 812 output[index] = int(output[index]) | 812 output[index] = int(output[index]) |
| 813 elif IsStrCanonicalInt(output): | 813 elif IsStrCanonicalInt(output): |
| 814 output = int(output) | 814 output = int(output) |
| 815 | 815 |
| 816 gyp.DebugOutput(gyp.DEBUG_VARIABLES, | |
| 817 "Expanding %s to %s" % (repr(input), repr(output))) | |
| 818 return output | 816 return output |
| 819 | 817 |
| 820 | 818 |
| 821 def ProcessConditionsInDict(the_dict, phase, variables, build_file): | 819 def ProcessConditionsInDict(the_dict, phase, variables, build_file): |
| 822 # Process a 'conditions' or 'target_conditions' section in the_dict, | 820 # Process a 'conditions' or 'target_conditions' section in the_dict, |
| 823 # depending on phase. | 821 # depending on phase. |
| 824 # early -> conditions | 822 # early -> conditions |
| 825 # late -> target_conditions | 823 # late -> target_conditions |
| 826 # latelate -> no conditions | 824 # latelate -> no conditions |
| 827 # | 825 # |
| (...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 ValidateRunAsInTarget(target, target_dict, build_file) | 2474 ValidateRunAsInTarget(target, target_dict, build_file) |
| 2477 ValidateActionsInTarget(target, target_dict, build_file) | 2475 ValidateActionsInTarget(target, target_dict, build_file) |
| 2478 | 2476 |
| 2479 # Generators might not expect ints. Turn them into strs. | 2477 # Generators might not expect ints. Turn them into strs. |
| 2480 TurnIntIntoStrInDict(data) | 2478 TurnIntIntoStrInDict(data) |
| 2481 | 2479 |
| 2482 # TODO(mark): Return |data| for now because the generator needs a list of | 2480 # TODO(mark): Return |data| for now because the generator needs a list of |
| 2483 # build files that came in. In the future, maybe it should just accept | 2481 # build files that came in. In the future, maybe it should just accept |
| 2484 # a list, and not the whole data dict. | 2482 # a list, and not the whole data dict. |
| 2485 return [flat_list, targets, data] | 2483 return [flat_list, targets, data] |
| OLD | NEW |