Skip to content

Commit 46cfabb

Browse files
committed
unix: use environment variables in build-tk.sh
1 parent f88957a commit 46cfabb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

cpython-unix/build-tk.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55

66
set -ex
77

8-
cd /build
8+
ROOT=`pwd`
99

10-
export PATH=/tools/deps/bin:/tools/${TOOLCHAIN}/bin:/tools/host/bin:$PATH
11-
export PKG_CONFIG_PATH=/tools/deps/share/pkgconfig:/tools/deps/lib/pkgconfig
10+
export PATH=${TOOLS_PATH}/deps/bin:${TOOLS_PATH}/${TOOLCHAIN}/bin:${TOOLS_PATH}/host/bin:$PATH
11+
export PKG_CONFIG_PATH=${TOOLS_PATH}/deps/share/pkgconfig:${TOOLS_PATH}/deps/lib/pkgconfig
1212

1313
tar -xf tk${TK_VERSION}-src.tar.gz
1414
pushd tk8.6.9/unix
1515

1616
CFLAGS="-fPIC" ./configure \
1717
--prefix=/tools/deps \
18-
--x-includes=/tools/deps/include \
19-
--x-libraries=/tools/deps/lib \
20-
--with-tcl=/tools/deps/lib \
18+
--x-includes=${TOOLS_PATH}/deps/include \
19+
--x-libraries=${TOOLS_PATH}/deps/lib \
20+
--with-tcl=${TOOLS_PATH}/deps/lib \
2121
--enable-shared=no
2222

2323
# For some reason musl isn't link libXau and libxcb. So we hack the Makefile
@@ -32,7 +32,7 @@ if [ "${CC}" = "musl-clang" ]; then
3232
sed -i 's/install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}/install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE)/' Makefile
3333
fi
3434

35-
make -j `nproc`
35+
make -j ${NUM_CPUS}
3636
touch wish
37-
make -j `nproc` install DESTDIR=/build/out
38-
rm /build/out/tools/deps/bin/wish*
37+
make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out
38+
rm ${ROOT}/out/tools/deps/bin/wish*

0 commit comments

Comments
 (0)