| # Copyright 2015 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) |
| ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/../.." && pwd -P) |
| gyp -Ilibweave_common.gypi --toplevel-dir=. -f ninja $DIR/weave.gyp |
| if [ -z "$BUILD_CONFIG" ]; then |
| export BUILD_CONFIG=Debug |
| if [ -z "$BUILD_TARGET" ]; then |
| export BUILD_TARGET="weave libweave_testrunner libweave_exports_testrunner" |
| export CORES=`cat /proc/cpuinfo | grep processor | wc -l` |
| ninja -j $CORES -C out/${BUILD_CONFIG} $BUILD_TARGET || exit 1 |
| if [[ $BUILD_TARGET == *"libweave_testrunner"* ]]; then |
| out/${BUILD_CONFIG}/libweave_testrunner || exit 1 |
| out/${BUILD_CONFIG}/libweave_exports_testrunner || exit 1 |