| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Downloads, builds (with instrumentation) and installs shared libraries.""" | 6 """Downloads, builds (with instrumentation) and installs shared libraries.""" |
| 7 | 7 |
| 8 import argparse | 8 import argparse |
| 9 import os | 9 import os |
| 10 import platform | 10 import platform |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 shell_call("%s/fix_rpaths.sh %s/lib" % (SCRIPT_ABSOLUTE_PATH, destdir)) | 88 shell_call("%s/fix_rpaths.sh %s/lib" % (SCRIPT_ABSOLUTE_PATH, destdir)) |
| 89 | 89 |
| 90 | 90 |
| 91 def destdir_configure_make_install(parsed_arguments, environment, | 91 def destdir_configure_make_install(parsed_arguments, environment, |
| 92 install_prefix): | 92 install_prefix): |
| 93 configure_command = './configure %s' % parsed_arguments.extra_configure_flags | 93 configure_command = './configure %s' % parsed_arguments.extra_configure_flags |
| 94 configure_command += ' --libdir=/lib/' | 94 configure_command += ' --libdir=/lib/' |
| 95 # Installing to a temporary directory allows us to safely clean up the .la | 95 # Installing to a temporary directory allows us to safely clean up the .la |
| 96 # files below. | 96 # files below. |
| 97 destdir = '%s/debian/instrumented_build' % os.getcwd() | 97 destdir = '%s/debian/instrumented_build' % os.getcwd() |
| 98 # Some makefiles use BUILDROOT instead of DESTDIR. | 98 # Some makefiles use BUILDROOT or INSTALL_ROOT instead of DESTDIR. |
| 99 make_command = 'make DESTDIR=%s BUILDROOT=%s INSTALL_ROOT=%s' % (destdir, | 99 make_command = 'make DESTDIR=%s BUILDROOT=%s INSTALL_ROOT=%s' % (destdir, |
| 100 destdir, | 100 destdir, |
| 101 destdir) | 101 destdir) |
| 102 build_and_install_in_destdir = [ | 102 build_and_install_in_destdir = [ |
| 103 configure_command, | 103 configure_command, |
| 104 '%s -j%s' % (make_command, parsed_arguments.jobs), | 104 '%s -j%s' % (make_command, parsed_arguments.jobs), |
| 105 # Parallel install is flaky for some packages. | 105 # Parallel install is flaky for some packages. |
| 106 '%s install -j1' % make_command, | 106 '%s install -j1' % make_command, |
| 107 # Kill the .la files. They contain absolute paths, and will cause build | 107 # Kill the .la files. They contain absolute paths, and will cause build |
| 108 # errors in dependent libraries. | 108 # errors in dependent libraries. |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 os.chdir(SCRIPT_ABSOLUTE_PATH) | 391 os.chdir(SCRIPT_ABSOLUTE_PATH) |
| 392 # Ensure all build dependencies are installed. | 392 # Ensure all build dependencies are installed. |
| 393 if parsed_arguments.check_build_deps: | 393 if parsed_arguments.check_build_deps: |
| 394 check_package_build_dependencies(parsed_arguments.package) | 394 check_package_build_dependencies(parsed_arguments.package) |
| 395 | 395 |
| 396 download_build_install(parsed_arguments) | 396 download_build_install(parsed_arguments) |
| 397 | 397 |
| 398 | 398 |
| 399 if __name__ == '__main__': | 399 if __name__ == '__main__': |
| 400 main() | 400 main() |
| OLD | NEW |