Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: libraries/nacl-mounts/nacl-nacl-mounts.sh

Issue 11885025: Allow re-targeting of naclports install (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 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 # 6 #
7 # nacl-mounts.sh 7 # nacl-mounts.sh
8 # 8 #
9 # usage: ./nacl-mounts.sh 9 # usage: ./nacl-mounts.sh
10 # 10 #
(...skipping 20 matching lines...) Expand all
31 return 31 return
32 fi 32 fi
33 33
34 if [ ${NACL_ARCH} = "pnacl" ]; then 34 if [ ${NACL_ARCH} = "pnacl" ]; then
35 echo "FIXME: Not running sel_ldr-based tests with PNaCl." 35 echo "FIXME: Not running sel_ldr-based tests with PNaCl."
36 return 36 return
37 fi 37 fi
38 38
39 export CC=${NACLCC} 39 export CC=${NACLCC}
40 export CXX=${NACLCXX} 40 export CXX=${NACLCXX}
41 export CFLAGS="-I${NACL_SDK_USR_INCLUDE} -I${NACL_SDK_ROOT}/include" 41 export CFLAGS="${NACLPORTS_CFLAGS} -I${NACL_SDK_ROOT}/include"
42
43 LDFLAGS=-L${NACL_SDK_USR_LIB}
44 if [ $NACL_GLIBC != "1" ] ; then
45 LDFLAGS="${LDFLAGS}"
46 fi
47 export LDFLAGS
48 42
49 MakeDir ${PACKAGE_DIR}/test.nacl 43 MakeDir ${PACKAGE_DIR}/test.nacl
50 ChangeDir ${PACKAGE_DIR}/test.nacl 44 ChangeDir ${PACKAGE_DIR}/test.nacl
51 make -f ${START_DIR}/test.nacl/Makefile 45 make -f ${START_DIR}/test.nacl/Makefile
52 46
53 RunSelLdrCommand ${PACKAGE_DIR}/test.nacl/nacl_mounts_sel_ldr_tests 47 RunSelLdrCommand ${PACKAGE_DIR}/test.nacl/nacl_mounts_sel_ldr_tests
54 } 48 }
55 49
56 CustomBuildStep() { 50 CustomBuildStep() {
57 Banner "Building ${PACKAGE_NAME}" 51 Banner "Building ${PACKAGE_NAME}"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 SocketSubSystem.o \ 120 SocketSubSystem.o \
127 BufferMount.o 121 BufferMount.o
128 122
129 ${NACLRANLIB} libnacl-mounts.a 123 ${NACLRANLIB} libnacl-mounts.a
130 set +x 124 set +x
131 } 125 }
132 126
133 CustomInstallStep() { 127 CustomInstallStep() {
134 Banner "Installing ${PACKAGE_NAME}" 128 Banner "Installing ${PACKAGE_NAME}"
135 export PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}" 129 export PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}"
136 cp ${PACKAGE_DIR}/libnacl-mounts.a ${NACL_SDK_USR_LIB} 130 cp ${PACKAGE_DIR}/libnacl-mounts.a ${NACLPORTS_LIBDIR}
137 mkdir -p ${NACL_SDK_USR_LIB}/nacl-mounts/util 131 mkdir -p ${NACLPORTS_LIBDIR}/nacl-mounts/util
138 cp ${START_DIR}/console/console.js ${NACL_SDK_USR_LIB}/nacl-mounts 132 cp ${START_DIR}/console/console.js ${NACLPORTS_LIBDIR}/nacl-mounts
139 cp ${START_DIR}/http2/genfs.py ${NACL_SDK_USR_LIB}/nacl-mounts/util 133 cp ${START_DIR}/http2/genfs.py ${NACLPORTS_LIBDIR}/nacl-mounts/util
140 134
141 # GLibC toolchain has termio.h so don't copy stub header. 135 # GLibC toolchain has termio.h so don't copy stub header.
142 if [[ $NACL_GLIBC = 0 ]]; then 136 if [[ $NACL_GLIBC = 0 ]]; then
143 cp ${START_DIR}/console/termio.h ${NACL_SDK_USR_INCLUDE} 137 cp ${START_DIR}/console/termio.h ${NACLPORTS_INCLUDE}
144 fi 138 fi
145 139
146 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts 140 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts
147 for DIR in console base util memory net http2 AppEngine pepper buffer; do 141 for DIR in console base util memory net http2 AppEngine pepper buffer; do
148 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts/${DIR} 142 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts/${DIR}
149 cp ${START_DIR}/${DIR}/*.h ${NACL_SDK_USR_INCLUDE}/nacl-mounts/${DIR} 143 cp ${START_DIR}/${DIR}/*.h ${NACLPORTS_INCLUDE}/nacl-mounts/${DIR}
150 done 144 done
151 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/cpp/private 145 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/cpp/private
152 mkdir -p ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/c/private 146 mkdir -p ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/c/private
153 cp -R ${START_DIR}/ppapi/cpp/private/*.h \ 147 cp -R ${START_DIR}/ppapi/cpp/private/*.h \
154 ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/cpp/private/ 148 ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/cpp/private/
155 cp -R ${START_DIR}/ppapi/c/private/*.h \ 149 cp -R ${START_DIR}/ppapi/c/private/*.h \
156 ${NACL_SDK_USR_INCLUDE}/nacl-mounts/ppapi/c/private/ 150 ${NACLPORTS_INCLUDE}/nacl-mounts/ppapi/c/private/
157 } 151 }
158 152
159 CustomPackageInstall() { 153 CustomPackageInstall() {
160 # RunTests 154 # RunTests
161 DefaultPreInstallStep 155 DefaultPreInstallStep
162 CustomBuildStep 156 CustomBuildStep
163 CustomInstallStep 157 CustomInstallStep
164 DefaultCleanUpStep 158 DefaultCleanUpStep
165 DefaultTouchStep 159 DefaultTouchStep
166 RunSelLdrTests 160 RunSelLdrTests
167 } 161 }
168 162
169 CustomPackageInstall 163 CustomPackageInstall
170 exit 0 164 exit 0
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698