OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 | 7 |
8 # This script will update Skia's dependenciess as necessary and run | 8 # This script will update Skia's dependenciess as necessary and run |
9 # gyp if needed. | 9 # gyp if needed. |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 if ! [ -f DEPS ]; then | 30 if ! [ -f DEPS ]; then |
31 echo DEPS file missing >&2 | 31 echo DEPS file missing >&2 |
32 exit 1 | 32 exit 1 |
33 fi | 33 fi |
34 | 34 |
35 if [ "$(git hash-object DEPS)" != "$(git config sync-deps.last)" ] ; then | 35 if [ "$(git hash-object DEPS)" != "$(git config sync-deps.last)" ] ; then |
36 gclient sync || exit | 36 gclient sync || exit |
37 git config sync-deps.last "$(git hash-object DEPS)" | 37 git config sync-deps.last "$(git hash-object DEPS)" |
38 fi | 38 fi |
39 | 39 |
40 function catifexists() { if [ -f "$1" ]; then cat "$1"; fi; } | 40 catifexists() { if [ -f "$1" ]; then cat "$1"; fi; } |
41 | 41 |
42 function gyp_hasher() { | 42 gyp_hasher() { |
43 { | 43 { |
44 echo "$CC" | 44 echo "$CC" |
45 echo "$CXX" | 45 echo "$CXX" |
46 echo "$GYP_GENERATORS" | 46 echo "$GYP_GENERATORS" |
47 echo "$GYP_DEFINES" | 47 echo "$GYP_DEFINES" |
48 find gyp -type f -print -exec git hash-object {} \; | 48 find gyp -type f -print -exec git hash-object {} \; |
49 find bench gm tests -name '*.c*' | LANG= sort | 49 find bench gm tests -name '*.c*' | LANG= sort |
50 } | git hash-object --stdin | 50 } | git hash-object --stdin |
51 } | 51 } |
52 | 52 |
53 : ${SKIA_OUT:=out} | 53 : ${SKIA_OUT:=out} |
54 GYP_HASH=$(gyp_hasher) | 54 GYP_HASH=$(gyp_hasher) |
55 HASH_PATH="${SKIA_OUT}/gyp_hash" | 55 HASH_PATH="${SKIA_OUT}/gyp_hash" |
56 if [ "$GYP_HASH" != "$(catifexists "$HASH_PATH")" ]; then | 56 if [ "$GYP_HASH" != "$(catifexists "$HASH_PATH")" ]; then |
57 python ./gyp_skia || exit | 57 python ./gyp_skia || exit |
58 echo "$GYP_HASH" > "$HASH_PATH" | 58 echo "$GYP_HASH" > "$HASH_PATH" |
59 fi | 59 fi |
OLD | NEW |