From 8e70cbffc89632be85c13567cc30bcc6c8336236 Mon Sep 17 00:00:00 2001 From: Intubun <41478036+Intubun@users.noreply.github.com> Date: Thu, 21 May 2026 14:40:27 +0200 Subject: [PATCH] build-tcl-wasm.sh: guard against missing tclConfig.sh after emconfigure --- toolchains/emscripten/build-tcl-wasm.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/toolchains/emscripten/build-tcl-wasm.sh b/toolchains/emscripten/build-tcl-wasm.sh index 1be4a8a0..1de9b864 100644 --- a/toolchains/emscripten/build-tcl-wasm.sh +++ b/toolchains/emscripten/build-tcl-wasm.sh @@ -104,6 +104,16 @@ if [ ! -f Makefile ]; then --prefix="$OUT/install" fi +# emconfigure writes tclConfig.sh into the build dir. If it is missing, the +# $(. tclConfig.sh) assignments below silently produce empty strings (bash does +# not propagate errors from command-substitution assignments through set -e), +# so we catch the missing file here before the cryptic "no rule to make target +# ''" error from emmake. +if [ ! -f "$OUT/tclConfig.sh" ]; then + echo "Error: $OUT/tclConfig.sh not found — emconfigure may have failed." >&2 + exit 1 +fi + # --- build ------------------------------------------------------------------ # HOST_CC/AR/RANLIB must be native — TCL's Makefile builds a `minizip` tool # that runs on the host to produce the embedded zipfs resource. Without this