Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: bin/deps-and-gyp

Issue 1415193006: bin/deps-and-gyp: deal with corner cases cleanly (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 SKIA_OUT="$(cd "$SKIA_OUT"; pwd)" 27 SKIA_OUT="$(cd "$SKIA_OUT"; pwd)"
28 fi 28 fi
29 29
30 cd "$(dirname "$0")/.." 30 cd "$(dirname "$0")/.."
31 31
32 if ! [ -f DEPS ]; then 32 if ! [ -f DEPS ]; then
33 echo DEPS file missing >&2 33 echo DEPS file missing >&2
34 exit 1 34 exit 1
35 fi 35 fi
36 36
37 if [ "$(git hash-object DEPS)" != "$(git config sync-deps.last)" ] ; then 37 GIT_SYNC_DEPS_QUIET=1 python tools/git-sync-deps || exit
38 GIT_SYNC_DEPS_QUIET=1 python tools/git-sync-deps || exit
39 git config sync-deps.last "$(git hash-object DEPS)"
40 fi
41 38
42 catifexists() { if [ -f "$1" ]; then cat "$1"; fi; } 39 catifexists() { if [ -f "$1" ]; then cat "$1"; fi; }
43 40
44 gyp_hasher() { 41 gyp_hasher() {
45 { 42 {
46 echo "$CC" 43 echo "$CC"
47 echo "$CXX" 44 echo "$CXX"
48 echo "$GYP_GENERATORS" 45 echo "$GYP_GENERATORS"
49 echo "$GYP_DEFINES" 46 echo "$GYP_DEFINES"
50 find gyp -type f -print -exec git hash-object {} \; 47 find gyp -type f -print -exec git hash-object {} \;
51 find bench gm tests -name '*.c*' | LANG= sort 48 find bench gm tests -name '*.c*' | LANG= sort
52 } | git hash-object --stdin 49 } | git hash-object --stdin
53 } 50 }
54 51
55 : ${SKIA_OUT:=out} 52 : ${SKIA_OUT:=out}
56 GYP_HASH=$(gyp_hasher) 53 GYP_HASH=$(gyp_hasher)
57 HASH_PATH="${SKIA_OUT}/gyp_hash" 54 HASH_PATH="${SKIA_OUT}/gyp_hash"
58 if [ "$GYP_HASH" != "$(catifexists "$HASH_PATH")" ]; then 55 if [ "$GYP_HASH" != "$(catifexists "$HASH_PATH")" ]; then
59 python ./gyp_skia || exit 56 python ./gyp_skia || exit
60 echo "$GYP_HASH" > "$HASH_PATH" 57 echo "$GYP_HASH" > "$HASH_PATH"
61 fi 58 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698