| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 # This script will check out iwyu into the llvm directory and build it. | 6 # This script will check out iwyu into the llvm directory and build it. |
| 7 # iwyu will appear in third_party/llvm-build/Release+Asserts/bin. | 7 # iwyu will appear in third_party/llvm-build/Release+Asserts/bin. |
| 8 | 8 |
| 9 # Die if any command dies. | 9 # Die if any command dies. |
| 10 set -e | 10 set -e |
| 11 | 11 |
| 12 # Echo all commands. | 12 # Echo all commands. |
| 13 set -x | 13 set -x |
| 14 | 14 |
| 15 THIS_DIR="$(dirname "${0}")" | 15 THIS_DIR="$(dirname "${0}")" |
| 16 | 16 |
| 17 # Make sure clang is checked out and built. | 17 # Make sure clang is checked out and built. |
| 18 "${THIS_DIR}"/update.sh | 18 "${THIS_DIR}"/update.sh |
| 19 | 19 |
| 20 LLVM_DIR="${THIS_DIR}"/../../../third_party/llvm | 20 LLVM_DIR="${THIS_DIR}"/../../../third_party/llvm |
| 21 IWYU_DIR="${LLVM_DIR}"/tools/clang/tools/include-what-you-use | 21 IWYU_DIR="${LLVM_DIR}"/tools/clang/tools/include-what-you-use |
| 22 | 22 |
| 23 # Check out. | 23 # Check out. |
| 24 svn co --force http://include-what-you-use.googlecode.com/svn/trunk/ \ | 24 svn co --force https://include-what-you-use.googlecode.com/svn/trunk/ \ |
| 25 "${IWYU_DIR}" | 25 "${IWYU_DIR}" |
| 26 | 26 |
| 27 # Build iwyu. | 27 # Build iwyu. |
| 28 # Copy it into the clang tree and use clang's build system to compile it. | 28 # Copy it into the clang tree and use clang's build system to compile it. |
| 29 LLVM_BUILD_DIR="${LLVM_DIR}"/../llvm-build | 29 LLVM_BUILD_DIR="${LLVM_DIR}"/../llvm-build |
| 30 IWYU_BUILD_DIR="${LLVM_BUILD_DIR}"/tools/clang/tools/include-what-you-use | 30 IWYU_BUILD_DIR="${LLVM_BUILD_DIR}"/tools/clang/tools/include-what-you-use |
| 31 mkdir -p "${IWYU_BUILD_DIR}" | 31 mkdir -p "${IWYU_BUILD_DIR}" |
| 32 cp "${IWYU_DIR}"/Makefile "${IWYU_BUILD_DIR}" | 32 cp "${IWYU_DIR}"/Makefile "${IWYU_BUILD_DIR}" |
| 33 make -j"${NUM_JOBS}" -C "${IWYU_BUILD_DIR}" | 33 make -j"${NUM_JOBS}" -C "${IWYU_BUILD_DIR}" |
| OLD | NEW |