| OLD | NEW |
| 1 # | 1 # |
| 2 # __COPYRIGHT__ | 2 # __COPYRIGHT__ |
| 3 # | 3 # |
| 4 # Permission is hereby granted, free of charge, to any person obtaining | 4 # Permission is hereby granted, free of charge, to any person obtaining |
| 5 # a copy of this software and associated documentation files (the | 5 # a copy of this software and associated documentation files (the |
| 6 # "Software"), to deal in the Software without restriction, including | 6 # "Software"), to deal in the Software without restriction, including |
| 7 # without limitation the rights to use, copy, modify, merge, publish, | 7 # without limitation the rights to use, copy, modify, merge, publish, |
| 8 # distribute, sublicense, and/or sell copies of the Software, and to | 8 # distribute, sublicense, and/or sell copies of the Software, and to |
| 9 # permit persons to whom the Software is furnished to do so, subject to | 9 # permit persons to whom the Software is furnished to do so, subject to |
| 10 # the following conditions: | 10 # the following conditions: |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 """ | 956 """ |
| 957 executor = target.get_executor() | 957 executor = target.get_executor() |
| 958 base_cl = map(str, base_env.subst_list(executor)[0]) | 958 base_cl = map(str, base_env.subst_list(executor)[0]) |
| 959 file_cl = map(str, file_env.subst_list(executor)[0]) | 959 file_cl = map(str, file_env.subst_list(executor)[0]) |
| 960 if base_cl == file_cl: | 960 if base_cl == file_cl: |
| 961 return | 961 return |
| 962 | 962 |
| 963 base_tool = self.cl_to_tool(base_cl) | 963 base_tool = self.cl_to_tool(base_cl) |
| 964 file_tool = self.cl_to_tool(file_cl) | 964 file_tool = self.cl_to_tool(file_cl) |
| 965 | 965 |
| 966 if not base_tool or not_file_tool: |
| 967 return |
| 968 |
| 966 file_tool.diff(base_tool) | 969 file_tool.diff(base_tool) |
| 967 | 970 |
| 968 self.AddFileConfig(source, name, tools=[file_tool]) | 971 self.AddFileConfig(source, name, tools=[file_tool]) |
| 969 | 972 |
| 970 def _AddFileConfigurations(self, env): | 973 def _AddFileConfigurations(self, env): |
| 971 """Adds per-file configurations for the buildtarget's sources. | 974 """Adds per-file configurations for the buildtarget's sources. |
| 972 | 975 |
| 973 Args: | 976 Args: |
| 974 env: The base construction environment for the project. | 977 env: The base construction environment for the project. |
| 975 """ | 978 """ |
| 976 if not self.buildtargets: | 979 if not self.buildtargets: |
| 977 return | 980 return |
| 978 | 981 |
| 979 for bt in self.buildtargets: | 982 for bt in self.buildtargets: |
| 980 executor = bt.get_executor() | 983 executor = bt.get_executor() |
| 981 build_env = bt.get_build_env() | 984 build_env = bt.get_build_env() |
| 982 bt_cl = map(str, build_env.subst_list(executor)[0]) | 985 bt_cl = map(str, build_env.subst_list(executor)[0]) |
| 983 tool = self.cl_to_tool(bt_cl) | 986 tool = self.cl_to_tool(bt_cl) |
| 984 default_tool = self.cl_to_tool([bt_cl[0]]) | 987 default_tool = self.cl_to_tool([bt_cl[0]]) |
| 985 if default_tool: | 988 if default_tool: |
| 986 tool.diff(default_tool) | 989 tool.diff(default_tool) |
| 987 else: | 990 else: |
| 988 print "no tool for %r" % bt_cl[0] | 991 # TODO(sgk): print a message unconditionally is too |
| 992 # verbose for things like Python function actions, |
| 993 # but doing nothing runs the risk of burying problems. |
| 994 # Work out a better solution. |
| 995 #print "no tool for %r" % bt_cl[0] |
| 996 pass |
| 989 for t in bt.sources: | 997 for t in bt.sources: |
| 990 e = t.get_build_env() | 998 e = t.get_build_env() |
| 991 additional_files = SCons.Util.UniqueList() | 999 additional_files = SCons.Util.UniqueList() |
| 992 for s in t.sources: | 1000 for s in t.sources: |
| 993 s = env.arg2nodes([s])[0].srcnode() | 1001 s = env.arg2nodes([s])[0].srcnode() |
| 994 if not self.FindFile(s): | 1002 if not self.FindFile(s): |
| 995 additional_files.append(s) | 1003 additional_files.append(s) |
| 996 if not build_env is e: | 1004 if not build_env is e: |
| 997 # TODO(sgk): This test may be bogus, but it works for now. | 1005 # TODO(sgk): This test may be bogus, but it works for now. |
| 998 # We're trying to figure out if the file configuration | 1006 # We're trying to figure out if the file configuration |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 LookupAdd(item, result) | 1370 LookupAdd(item, result) |
| 1363 return result | 1371 return result |
| 1364 | 1372 |
| 1365 import __builtin__ | 1373 import __builtin__ |
| 1366 | 1374 |
| 1367 __builtin__.MSVSConfig = MSVSConfig | 1375 __builtin__.MSVSConfig = MSVSConfig |
| 1368 __builtin__.MSVSFilter = MSVSFilter | 1376 __builtin__.MSVSFilter = MSVSFilter |
| 1369 __builtin__.MSVSProject = MSVSProject | 1377 __builtin__.MSVSProject = MSVSProject |
| 1370 __builtin__.MSVSSolution = MSVSSolution | 1378 __builtin__.MSVSSolution = MSVSSolution |
| 1371 __builtin__.MSVSTool = MSVSTool | 1379 __builtin__.MSVSTool = MSVSTool |
| OLD | NEW |