| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 source pkg_info | 6 BUILD_DIR=${START_DIR} |
| 7 source ../../build_tools/common.sh | |
| 8 | 7 |
| 9 BuildStep() { | 8 BuildStep() { |
| 10 # The sample is built using the NaCl SDK common.mk system. | 9 # The sample is built using the NaCl SDK common.mk system. |
| 11 # We override $(OUTBASE) to force the build system to put | 10 # We override $(OUTBASE) to force the build system to put |
| 12 # all its artifacts in ${NACL_PACKAGES_REPOSITORY} rather | 11 # all its artifacts in ${NACL_PACKAGES_REPOSITORY} rather |
| 13 # than alongside the Makefile. | 12 # than alongside the Makefile. |
| 14 export OUTBASE=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR} | 13 export OUTBASE=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR} |
| 15 export NACLPORTS_INCLUDE | 14 export NACLPORTS_INCLUDE |
| 16 export NACL_PACKAGES_PUBLISH | 15 export NACL_PACKAGES_PUBLISH |
| 17 if [ "${NACL_ARCH}" = "pnacl" ]; then | 16 if [ "${NACL_ARCH}" = "pnacl" ]; then |
| 18 MAKEFLAGS+=" TOOLCHAIN=pnacl" | 17 MAKEFLAGS+=" TOOLCHAIN=pnacl" |
| 19 elif [ "${NACL_GLIBC}" = "1" ]; then | 18 elif [ "${NACL_GLIBC}" = "1" ]; then |
| 20 MAKEFLAGS+=" TOOLCHAIN=glibc" | 19 MAKEFLAGS+=" TOOLCHAIN=glibc" |
| 21 MAKEFLAGS+=" NACL_ARCH=${NACL_ARCH_ALT}" | 20 MAKEFLAGS+=" NACL_ARCH=${NACL_ARCH_ALT}" |
| 22 else | 21 else |
| 23 MAKEFLAGS+=" TOOLCHAIN=newlib" | 22 MAKEFLAGS+=" TOOLCHAIN=newlib" |
| 24 MAKEFLAGS+=" NACL_ARCH=${NACL_ARCH_ALT}" | 23 MAKEFLAGS+=" NACL_ARCH=${NACL_ARCH_ALT}" |
| 25 fi | 24 fi |
| 26 export MAKEFLAGS | 25 export MAKEFLAGS |
| 27 ChangeDir ${START_DIR} | |
| 28 DefaultBuildStep | 26 DefaultBuildStep |
| 29 } | 27 } |
| 30 | |
| 31 PackageInstall | |
| 32 exit 0 | |
| OLD | NEW |