| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 # FIXME: Remove this file altogether. It's useless in a Blink checkout. | 29 # FIXME: Remove this file altogether. It's useless in a Blink checkout. |
| 30 | 30 |
| 31 import logging | 31 import logging |
| 32 | 32 |
| 33 from webkitpy.common import webkit_finder | 33 from webkitpy.common import webkit_finder |
| 34 | 34 |
| 35 | |
| 36 _log = logging.getLogger(__name__) | 35 _log = logging.getLogger(__name__) |
| 37 | 36 |
| 38 | 37 |
| 39 class Config(object): | 38 class Config(object): |
| 40 _FLAGS_FROM_CONFIGURATIONS = { | 39 _FLAGS_FROM_CONFIGURATIONS = {"Debug": "--debug", "Release": "--release", } |
| 41 "Debug": "--debug", | |
| 42 "Release": "--release", | |
| 43 } | |
| 44 | 40 |
| 45 def __init__(self, executive, filesystem, port_implementation=None): | 41 def __init__(self, executive, filesystem, port_implementation=None): |
| 46 self._executive = executive | 42 self._executive = executive |
| 47 self._filesystem = filesystem | 43 self._filesystem = filesystem |
| 48 self._webkit_finder = webkit_finder.WebKitFinder(self._filesystem) | 44 self._webkit_finder = webkit_finder.WebKitFinder(self._filesystem) |
| 49 self._default_configuration = None | 45 self._default_configuration = None |
| 50 self._build_directories = {} | 46 self._build_directories = {} |
| 51 self._port_implementation = port_implementation | 47 self._port_implementation = port_implementation |
| 52 | 48 |
| 53 def build_directory(self, configuration): | 49 def build_directory(self, configuration): |
| (...skipping 10 matching lines...) Expand all Loading... |
| 64 if not self._build_directories.get(configuration): | 60 if not self._build_directories.get(configuration): |
| 65 self._build_directories[configuration] = self._webkit_finder.path_fr
om_webkit_base('out', configuration) | 61 self._build_directories[configuration] = self._webkit_finder.path_fr
om_webkit_base('out', configuration) |
| 66 | 62 |
| 67 return self._build_directories[configuration] | 63 return self._build_directories[configuration] |
| 68 | 64 |
| 69 def flag_for_configuration(self, configuration): | 65 def flag_for_configuration(self, configuration): |
| 70 return self._FLAGS_FROM_CONFIGURATIONS[configuration] | 66 return self._FLAGS_FROM_CONFIGURATIONS[configuration] |
| 71 | 67 |
| 72 def default_configuration(self): | 68 def default_configuration(self): |
| 73 return 'Release' | 69 return 'Release' |
| OLD | NEW |