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

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

Issue 1423463005: bin/deps-and-gyp -> bin/sync-and-gyp (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 | bin/sync-and-gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2
3 # Copyright 2015 Google Inc.
4 #
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
7
8 # This script will update Skia's dependenciess as necessary and run
9 # gyp if needed.
10
11 # Depends on: Posix-compliant shell, Python, and Git.
12 #
13 # Example usage:
14 #
15 # git clone https://skia.googlesource.com/skia
16 # cd skia
17 # bin/deps-and-gyp
18 # ninja -C out/Debug && out/Debug/dm
19 #
20 # Once changes are made to DEPS or gyp/ or the source, call:
21 #
22 # bin/deps-and-gyp
23
24 if [ "$SKIA_OUT" ]; then
25 mkdir -p "$SKIA_OUT" || exit
26 # get non-relative path of $SKIA_OUT before changing directory.
27 SKIA_OUT="$(cd "$SKIA_OUT"; pwd)"
28 fi
29
30 cd "$(dirname "$0")/.."
31
32 if ! [ -f DEPS ]; then
33 echo DEPS file missing >&2
34 exit 1
35 fi
36
37 GIT_SYNC_DEPS_QUIET=1 python tools/git-sync-deps || exit
38
39 catifexists() { if [ -f "$1" ]; then cat "$1"; fi; }
40
41 gyp_hasher() {
42 {
43 echo "$CC"
44 echo "$CXX"
45 echo "$GYP_GENERATORS"
46 echo "$GYP_DEFINES"
47 find gyp -type f -print -exec git hash-object {} \;
48 find bench gm tests -name '*.c*' | LANG= sort
49 } | git hash-object --stdin
50 }
51
52 : ${SKIA_OUT:=out}
53 GYP_HASH=$(gyp_hasher)
54 HASH_PATH="${SKIA_OUT}/gyp_hash"
55 if [ "$GYP_HASH" != "$(catifexists "$HASH_PATH")" ]; then
56 python ./gyp_skia || exit
57 echo "$GYP_HASH" > "$HASH_PATH"
58 fi
OLDNEW
« no previous file with comments | « no previous file | bin/sync-and-gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698