2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
9 SCRIPT_DIR="$(cd $(dirname $0) && pwd)"
13 NACLPORTS_URL=https://chromium.googlesource.com/external/naclports.git
14 NACLPORTS_REV=e53078c33d99b0b3cbadbbbbb92cccf7a48d5dc1
15 NACLPORTS_DIR=${OUT_DIR}/naclports
17 if [ -z "${NACL_SDK_ROOT:-}" ]; then
18 echo "-------------------------------------------------------------------"
19 echo "NACL_SDK_ROOT is unset."
20 echo "This environment variable needs to be pointed at some version of"
21 echo "the Native Client SDK (the directory containing toolchain/)."
22 echo "NOTE: set this to an absolute path."
23 echo "-------------------------------------------------------------------"
28 echo "######################################################################"
30 echo "######################################################################"
33 # echo a command to stdout and then execute it.
39 Banner Cloning naclports
40 if [ -d ${NACLPORTS_DIR} -a ! -d ${NACLPORTS_DIR}/src/.git ]; then
41 rm -rf ${NACLPORTS_DIR}
44 if [ ! -d ${NACLPORTS_DIR} ]; then
45 mkdir -p ${NACLPORTS_DIR}
46 pushd ${NACLPORTS_DIR}
47 gclient config --name=src ${NACLPORTS_URL}
51 pushd ${NACLPORTS_DIR}
52 gclient sync -r ${NACLPORTS_REV}
57 pushd ${NACLPORTS_DIR}/src
58 # Do a 'clean' first, since previous lua build from the naclports bundle
59 # building might be installed in the toolchain, and that one is built
60 # without readline support.
61 make TOOLCHAIN=pnacl clean
62 make TOOLCHAIN=pnacl lua-ppapi