| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright 2016 The WebRTC project authors. All Rights Reserved. | 3 # Copyright 2016 The WebRTC project authors. All Rights Reserved. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license | 5 # Use of this source code is governed by a BSD-style license |
| 6 # that can be found in the LICENSE file in the root of the source | 6 # that can be found in the LICENSE file in the root of the source |
| 7 # tree. An additional intellectual property rights grant can be found | 7 # tree. An additional intellectual property rights grant can be found |
| 8 # in the file PATENTS. All contributing project authors may | 8 # in the file PATENTS. All contributing project authors may |
| 9 # be found in the AUTHORS file in the root of the source tree. | 9 # be found in the AUTHORS file in the root of the source tree. |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 within the include directory. | 34 within the include directory. |
| 35 | 35 |
| 36 Args: | 36 Args: |
| 37 include_base_dir: directory where the include directory should be created | 37 include_base_dir: directory where the include directory should be created |
| 38 """ | 38 """ |
| 39 | 39 |
| 40 include_dir_name = 'include' | 40 include_dir_name = 'include' |
| 41 include_path = os.path.join(include_base_dir, include_dir_name) | 41 include_path = os.path.join(include_base_dir, include_dir_name) |
| 42 | 42 |
| 43 script_path = sys.path[0] | 43 script_path = sys.path[0] |
| 44 webrtc_base_path = os.path.join(script_path, '../..') | 44 webrtc_base_path = os.path.join(script_path, '../../..') |
| 45 | 45 |
| 46 header_dirs = HEADER_DIRS | 46 header_dirs = HEADER_DIRS |
| 47 include_headers = HEADER_INCLUDES | 47 include_headers = HEADER_INCLUDES |
| 48 exclude_headers = HEADER_EXCLUDES | 48 exclude_headers = HEADER_EXCLUDES |
| 49 if use_legacy_headers: | 49 if use_legacy_headers: |
| 50 header_dirs = LEGACY_HEADER_DIRS | 50 header_dirs = LEGACY_HEADER_DIRS |
| 51 include_headers = LEGACY_HEADER_INCLUDES | 51 include_headers = LEGACY_HEADER_INCLUDES |
| 52 exclude_headers = LEGACY_HEADER_EXCLUDES | 52 exclude_headers = LEGACY_HEADER_EXCLUDES |
| 53 | 53 |
| 54 for directory in header_dirs: | 54 for directory in header_dirs: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 77 parser = optparse.OptionParser() | 77 parser = optparse.OptionParser() |
| 78 _, args = parser.parse_args() | 78 _, args = parser.parse_args() |
| 79 if len(args) != 2: | 79 if len(args) != 2: |
| 80 parser.error('Error: Exactly 2 arguments required.') | 80 parser.error('Error: Exactly 2 arguments required.') |
| 81 include_base_dir = args[0] | 81 include_base_dir = args[0] |
| 82 use_legacy_headers = False if int(args[1]) == 0 else True | 82 use_legacy_headers = False if int(args[1]) == 0 else True |
| 83 ExportHeaders(include_base_dir, use_legacy_headers) | 83 ExportHeaders(include_base_dir, use_legacy_headers) |
| 84 | 84 |
| 85 if __name__ == '__main__': | 85 if __name__ == '__main__': |
| 86 sys.exit(Main()) | 86 sys.exit(Main()) |
| OLD | NEW |