#!/bin/bash # # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. readonly SCRIPT_DIR="$(dirname "$0")" readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd -P)" readonly SRC_DIR="$(dirname $(dirname ${SCRIPT_DIR_ABS}))" # Use the batch file as an entry point if on cygwin. if [ "x${OSTYPE}" = "xcygwin" ]; then # Use extended globbing (cygwin should always have it). shopt -s extglob # Filter out cygwin python (everything under /usr or /bin, or *cygwin*). export PATH=${PATH/#\/bin*([^:])/} export PATH=${PATH//:\/bin*([^:])/} export PATH=${PATH/#\/usr*([^:])/} export PATH=${PATH//:\/usr*([^:])/} export PATH=${PATH/#*([^:])cygwin*([^:])/} export PATH=${PATH//:*([^:])cygwin*([^:])/} "${SCRIPT_DIR_ABS}/scons.bat" $* exit fi readonly BASE_SCRIPT="${SRC_DIR}/third_party/scons-2.0.1/script/scons" export NACL_SDK_ROOT="${SCRIPT_DIR_ABS}/../../native_client" export SCONS_LIB_DIR="${SRC_DIR}/third_party/scons-2.0.1/engine" export PYTHONPATH="${SCONS_LIB_DIR}:${SRC_DIR}/native_client/build:${SCRIPT_DIR_ABS}" # We have to do this because scons overrides PYTHONPATH and does not preserve # what is provided by the OS. The custom variable name won't be overwritten. export PYMOX="${SRC_DIR}/third_party/pymox/src" "${BASE_SCRIPT}" --file=main.scons $*