Skip to content

Commit 0c6c9d9

Browse files
committed
fixup! Suppress
1 parent d6ca1a0 commit 0c6c9d9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

cpython-unix/build-tk.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,19 @@ CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure \
4242
${EXTRA_CONFIGURE_FLAGS}
4343

4444
# Remove wish, since we don't need it.
45-
sed -i '' 's/all: binaries libraries doc/all: libraries/' Makefile
46-
sed -i '' 's/install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}/install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE)/' Makefile
45+
if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then
46+
sed_args=(-i '' -e)
47+
else
48+
sed_args=(-i)
49+
fi
50+
sed "${sed_args[@]}" 's/all: binaries libraries doc/all: libraries/' Makefile
51+
sed "${sed_args[@]}" 's/install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}/install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE)/' Makefile
4752

4853
# For some reason musl isn't link libXau and libxcb. So we hack the Makefile
4954
# to do what we want.
5055
if [ "${CC}" = "musl-clang" ]; then
51-
sed -i '' 's/-ldl -lpthread /-ldl -lpthread -lXau -lxcb/' tkConfig.sh
52-
sed -i '' 's/-lpthread $(X11_LIB_SWITCHES) -ldl -lpthread/-lpthread $(X11_LIB_SWITCHES) -ldl -lpthread -lXau -lxcb/' Makefile
56+
sed "${sed_args[@]}" 's/-ldl -lpthread /-ldl -lpthread -lXau -lxcb/' tkConfig.sh
57+
sed "${sed_args[@]}" 's/-lpthread $(X11_LIB_SWITCHES) -ldl -lpthread/-lpthread $(X11_LIB_SWITCHES) -ldl -lpthread -lXau -lxcb/' Makefile
5358
fi
5459

5560
make -j ${NUM_CPUS}

0 commit comments

Comments
 (0)