diff options
author | mtklein <mtklein@chromium.org> | 2015-11-03 12:07:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-03 12:07:47 -0800 |
commit | 143fd5547c614704d95ec82ff791ae5211b06f2d (patch) | |
tree | 501ec461be65679c198fee0ac977eb5a716b7c35 /bin | |
parent | c03bdfa8e653fbdcb6b9f59ce862e00212e7c419 (diff) |
bin/deps-and-gyp -> bin/sync-and-gyp
NOTREECHECKS=true
BUG=skia:
Review URL: https://codereview.chromium.org/1423463005
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/deps-and-gyp | 58 | ||||
-rwxr-xr-x | bin/sync-and-gyp | 30 |
2 files changed, 14 insertions, 74 deletions
diff --git a/bin/deps-and-gyp b/bin/deps-and-gyp deleted file mode 100755 index 06f0fd5d90..0000000000 --- a/bin/deps-and-gyp +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -# Copyright 2015 Google Inc. -# -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This script will update Skia's dependenciess as necessary and run -# gyp if needed. - -# Depends on: Posix-compliant shell, Python, and Git. -# -# Example usage: -# -# git clone https://skia.googlesource.com/skia -# cd skia -# bin/deps-and-gyp -# ninja -C out/Debug && out/Debug/dm -# -# Once changes are made to DEPS or gyp/ or the source, call: -# -# bin/deps-and-gyp - -if [ "$SKIA_OUT" ]; then - mkdir -p "$SKIA_OUT" || exit - # get non-relative path of $SKIA_OUT before changing directory. - SKIA_OUT="$(cd "$SKIA_OUT"; pwd)" -fi - -cd "$(dirname "$0")/.." - -if ! [ -f DEPS ]; then - echo DEPS file missing >&2 - exit 1 -fi - -GIT_SYNC_DEPS_QUIET=1 python tools/git-sync-deps || exit - -catifexists() { if [ -f "$1" ]; then cat "$1"; fi; } - -gyp_hasher() { - { - echo "$CC" - echo "$CXX" - echo "$GYP_GENERATORS" - echo "$GYP_DEFINES" - find gyp -type f -print -exec git hash-object {} \; - find bench gm tests -name '*.c*' | LANG= sort - } | git hash-object --stdin -} - -: ${SKIA_OUT:=out} -GYP_HASH=$(gyp_hasher) -HASH_PATH="${SKIA_OUT}/gyp_hash" -if [ "$GYP_HASH" != "$(catifexists "$HASH_PATH")" ]; then - python ./gyp_skia || exit - echo "$GYP_HASH" > "$HASH_PATH" -fi diff --git a/bin/sync-and-gyp b/bin/sync-and-gyp index 8b3cfa97fe..c944079938 100755 --- a/bin/sync-and-gyp +++ b/bin/sync-and-gyp @@ -8,35 +8,33 @@ # This script will update Skia's dependenciess as necessary and run # gyp if needed. -# Example usage (assumes Posix-standard shell, git installed): +# Depends on: Posix-compliant shell, Python, and Git. +# +# Example usage: # -# git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git -# export PATH="${PWD}/depot_tools:${PATH}" # git clone https://skia.googlesource.com/skia # cd skia -# bin/sync-and-gyp && ninja -C out/Debug -# out/Debug/dm +# bin/sync-and-gyp +# ninja -C out/Debug && out/Debug/dm # -# Once changes are made to DEPS or gyp/ or the source, recompile Skia with: +# Once changes are made to DEPS or gyp/ or the source, call: # -# ${skiadir}/bin/sync-and-gyp && ninja -C ${skiadir}/out/Debug - -cd "$(dirname "$0")/.." +# bin/sync-and-gyp -if ! [ -f .gclient ] ; then - gclient config --unmanaged 'https://skia.googlesource.com/skia' - printf ',s/"skia"/"."/\nwq\n' | ed .gclient +if [ "$SKIA_OUT" ]; then + mkdir -p "$SKIA_OUT" || exit + # get non-relative path of $SKIA_OUT before changing directory. + SKIA_OUT="$(cd "$SKIA_OUT"; pwd)" fi +cd "$(dirname "$0")/.." + if ! [ -f DEPS ]; then echo DEPS file missing >&2 exit 1 fi -if [ "$(git hash-object DEPS)" != "$(git config sync-deps.last)" ] ; then - gclient sync || exit - git config sync-deps.last "$(git hash-object DEPS)" -fi +GIT_SYNC_DEPS_QUIET=1 python tools/git-sync-deps || exit catifexists() { if [ -f "$1" ]; then cat "$1"; fi; } |