Chromium Code Reviews| Index: gclient.py | 
| =================================================================== | 
| --- gclient.py (revision 134268) | 
| +++ gclient.py (working copy) | 
| @@ -47,6 +47,14 @@ | 
| { "pattern": "\\.(gif|jpe?g|pr0n|png)$", | 
| "action": ["python", "image_indexer.py", "--all"]}, | 
| ] | 
| + | 
| +Specifying a target OS | 
| + An optional key named "target_os" may be added to a gclient file to specify | 
| + one or more additional operating systems that should be considered when | 
| + processing the deps_os dict of a DEPS file. | 
| + | 
| + Example: | 
| + target_os = [ "android" ] | 
| """ | 
| __version__ = "0.6.4" | 
| @@ -843,6 +851,11 @@ | 
| except SyntaxError, e: | 
| gclient_utils.SyntaxErrorToError('.gclient', e) | 
| + # Append any target OS that is not already being enforced to the tuple. | 
| 
 
M-A Ruel
2012/04/27 15:52:21
Why not this two-liners instead? The only reason I
 
 | 
| + for target_os in config_dict.get('target_os', []): | 
| + if target_os not in self._enforced_os: | 
| + self._enforced_os = self._enforced_os + tuple([target_os]) | 
| + | 
| deps_to_add = [] | 
| for s in config_dict.get('solutions', []): | 
| try: |