OLD | NEW |
| (Empty) |
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 | |
7 # A script to invoke scons in gyp generated projects. | |
8 | |
9 # Find the 'src' directory by looking for the site_scons directory. | |
10 # This method allows trees that don't use the name src to use this script. | |
11 # Explicitly skip site_scons directories that are from the 'software | |
12 # construction toolkit', since these are not gyp compatible. | |
13 SRC_DIR=`pwd` | |
14 while [ ! -d "${SRC_DIR}/site_scons" ] || \ | |
15 [ -e "${SRC_DIR}/site_scons/site_tools/component_setup.py" ]; do | |
16 PARENT_DIR="$(dirname "${SRC_DIR}")" | |
17 if [ "${SRC_DIR}" = "${PARENT_DIR}" ]; then | |
18 echo "ERROR: hammer must be run in a directory with site_scons under" >&2 | |
19 echo " the root of the project tree." >&2 | |
20 exit 1 | |
21 fi | |
22 SRC_DIR="${PARENT_DIR}" | |
23 done | |
24 | |
25 SCONS="${SRC_DIR}/third_party/scons/scons.py" | |
26 SITE_SCONS="${SRC_DIR}/site_scons" | |
27 | |
28 exec python "${SCONS}" "--site-dir=${SITE_SCONS}" "$@" | |
OLD | NEW |