OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script contains some functions useful to build | 7 # This script contains some functions useful to build |
8 # Valgrind and ThreadSanitizer for use with chromium | 8 # Valgrind and ThreadSanitizer for use with chromium |
9 | 9 |
10 THISDIR=$(dirname "${0}") | 10 THISDIR=$(dirname "${0}") |
11 THISDIR=$(cd "${THISDIR}" && /bin/pwd) | 11 THISDIR=$(cd "${THISDIR}" && /bin/pwd) |
12 | 12 |
13 system_is_snow_leopard() { | 13 system_is_snow_leopard() { |
14 uname -r | grep 10\.[0-9]\.[0-9] >/dev/null | 14 uname -r | grep 10\.[0-9]\.[0-9] >/dev/null |
15 } | 15 } |
16 | 16 |
17 checkout_and_patch_valgrind() { | 17 checkout_and_patch_valgrind() { |
18 # $1 = Valgrind revision | 18 # $1 = Valgrind revision |
19 # $2 = VEX revision | 19 # $2 = VEX revision |
20 # $3 = source dir | 20 # $3 = source dir |
21 # Checkout Valgrind, apply our patches to Valgrind. | 21 # Checkout Valgrind, apply our patches to Valgrind. |
22 # The source will be put in $THISDIR/valgrind-source | 22 # The source will be put in $THISDIR/valgrind-source |
23 cd $THISDIR | 23 cd $THISDIR |
24 VG_REV="$1" | 24 VG_REV="$1" |
25 VEX_REV="$2" | 25 VEX_REV="$2" |
26 SOURCE_DIR="$3" | 26 SOURCE_DIR="$3" |
27 | 27 SVN_URI="svn://svn.valgrind.org/valgrind/trunk" |
28 if system_is_snow_leopard | |
29 then | |
30 SVN_URI="svn://svn.valgrind.org/valgrind/branches/MACOSX106" | |
31 else | |
32 SVN_URI="svn://svn.valgrind.org/valgrind/trunk" | |
33 fi | |
34 | 28 |
35 test -d "$SOURCE_DIR" && rm -rf "$SOURCE_DIR" | 29 test -d "$SOURCE_DIR" && rm -rf "$SOURCE_DIR" |
36 mkdir "$SOURCE_DIR" | 30 mkdir "$SOURCE_DIR" |
37 | 31 |
38 # Check out latest version that following patches known to apply against | 32 # Check out latest version that following patches known to apply against |
39 svn co -r "$VG_REV" "$SVN_URI" "$SOURCE_DIR" | 33 svn co -r "$VG_REV" "$SVN_URI" "$SOURCE_DIR" |
40 | 34 |
41 cd "$SOURCE_DIR" | 35 cd "$SOURCE_DIR" |
42 # Make sure svn gets the right version of the external VEX repo, too | 36 # Make sure svn gets the right version of the external VEX repo, too |
43 svn up -r "$VEX_REV" VEX/ | 37 svn up -r "$VEX_REV" VEX/ |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 # Check that the binaries directory exists. | 225 # Check that the binaries directory exists. |
232 BINARIES_DIR="$THISDIR/../binaries" | 226 BINARIES_DIR="$THISDIR/../binaries" |
233 if ! [ -a $BINARIES_DIR ] | 227 if ! [ -a $BINARIES_DIR ] |
234 then | 228 then |
235 echo "Error: $BINARIES_DIR doesn't exist!" >&2 | 229 echo "Error: $BINARIES_DIR doesn't exist!" >&2 |
236 exit 1 | 230 exit 1 |
237 fi | 231 fi |
238 | 232 |
239 set -e | 233 set -e |
240 set -x | 234 set -x |
OLD | NEW |