aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-02 20:12:25 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-02 20:12:25 +0000
commita749e60e74f7f0446fa6acaff4954b50fc31615c (patch)
tree84a9ab936164195ad2e9ce7892061d5841225f0a /platform_tools
parent51a11b7f2f7c0021022004d0d4b0924a590990f9 (diff)
arm64_make script changes
TODO: Call this script from the bots with command sh -x arm64_make Motivation: This will give the logs more complete information about what the scripts are doing. NOTRY=true R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/222803002 git-svn-id: http://skia.googlecode.com/svn/trunk@14032 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools')
-rwxr-xr-xplatform_tools/barelinux/bin/arm64_make4
-rwxr-xr-xplatform_tools/barelinux/bin/barelinux_make34
2 files changed, 14 insertions, 24 deletions
diff --git a/platform_tools/barelinux/bin/arm64_make b/platform_tools/barelinux/bin/arm64_make
index 96f16557e6..c64970e293 100755
--- a/platform_tools/barelinux/bin/arm64_make
+++ b/platform_tools/barelinux/bin/arm64_make
@@ -5,6 +5,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+set -e # When any command fails, the shell will immediately exit.
+
usage() {
cat >&2 <<EOF
arm64_make - this script builds a AArch64 version of skia that
@@ -48,5 +50,5 @@ export GYP_DEFINES="${GYP_DEFINES} \
skia_arch_type=arm64 \
"
-"$(dirname "$0")/barelinux_make" -t "$BUILD_TYPE"
+. "$(dirname "$0")/barelinux_make" -t "$BUILD_TYPE"
diff --git a/platform_tools/barelinux/bin/barelinux_make b/platform_tools/barelinux/bin/barelinux_make
index 4f2400f8ca..7673fd2631 100755
--- a/platform_tools/barelinux/bin/barelinux_make
+++ b/platform_tools/barelinux/bin/barelinux_make
@@ -5,6 +5,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+set -e # When any command fails, the shell will immediately exit.
+
+if echo $- | grep -q 'x'; then
+ # Debug mode
+ trap 'echo exit status = $?' EXIT
+fi
+
usage() {
cat >&2 <<EOF
barelinux_make - this script builds a version of skia that does not
@@ -52,27 +59,10 @@ GYP_DEFINES="${GYP_DEFINES} $*"
# If you move this script, this must be changed.
SKIA_SRC_DIR="$(cd "$(dirname "$0")/../../.."; pwd)"
-try() {
- # exit shell script on nonzero return code
- "$@"
- local ret=$?
- if [ $ret != 0 ] ; then
- echo "'$@' failed and returned ${ret}." >&2
- return $ret
- fi
-}
-is_set() {
- test "$1" && test "$(eval echo \${$1})";
-}
-
# Set a reasonable default.
-is_set SKIA_OUT || export SKIA_OUT="${SKIA_SRC_DIR}/out/barelinux"
-
-# Assume ninja is in your path
-try command -v ninja > /dev/null || exit
+export SKIA_OUT="${SKIA_OUT:-${SKIA_SRC_DIR}/out/barelinux}"
-try test -x "${SKIA_SRC_DIR}/gyp_skia" || exit
-try mkdir -p "$SKIA_OUT" || exit
+mkdir -p "$SKIA_OUT"
export GYP_GENERATORS="ninja"
export GYP_GENERATOR_FLAGS=""
@@ -87,9 +77,7 @@ export GYP_DEFINES="${GYP_DEFINES} \
skia_skip_gui=1 \
"
-try "${SKIA_SRC_DIR}/gyp_skia" || exit
-
-try test -d "${SKIA_OUT}/${BUILD_TYPE}" || exit
+"${SKIA_SRC_DIR}/gyp_skia"
-try ninja -C "${SKIA_OUT}/${BUILD_TYPE}" || exit
+ninja -C "${SKIA_OUT}/${BUILD_TYPE}"