summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2023-01-14 22:07:21 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2023-01-14 22:07:21 (GMT)
commit24656c280590bbc66e98685342c461af58f478a1 (patch)
tree8acb12351832975da2125d8294fe7ee7209b2102 /unix
parentcf560b3fb9c317bb0e6a6d458d5467aae8fc6a79 (diff)
downloadtcl-24656c280590bbc66e98685342c461af58f478a1.zip
tcl-24656c280590bbc66e98685342c461af58f478a1.tar.gz
tcl-24656c280590bbc66e98685342c461af58f478a1.tar.bz2
Properly quote contents of Make variables to pass through gdb.run file.
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index eac47a6..21d4085 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -270,6 +270,8 @@ VALGRINDARGS = --tool=memcheck --num-callers=24 \
--keep-debuginfo=yes \
--suppressions=$(TOOL_DIR)/valgrind_suppress
+shquotequote = $(subst ",\",$(subst ',\',$(1)))
+shquotesingle = $(subst ','\'',$(1))
#--------------------------------------------------------------------------
# The information below should be usable as is. The configure script won't
# modify it and you shouldn't need to modify it either.
@@ -816,9 +818,12 @@ test-tcl: ${TCLTEST_EXE}
$(SHELL_ENV) ./${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl $(TESTFLAGS)
gdb-test: ${TCLTEST_EXE}
- @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}" > gdb.run
- @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
- @echo "set args $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -singleproc 1" >> gdb.run
+ @printf '%s ' set env @LD_LIBRARY_PATH_VAR@=\"`pwd`$${@LD_LIBRARY_PATH_VAR@:+:$${@LD_LIBRARY_PATH_VAR}}\" > gdb.run
+ @printf '\n' >>gdb.run
+ @printf '%s ' set env TCL_LIBRARY=\'$(call shquotesingle,${TCL_BUILDTIME_LIBRARY})\' >> gdb.run
+ @printf '\n' >>gdb.run
+ @printf '%s ' set args $(call shquotequote,$(TOP_DIR))/tests/all.tcl\
+ $(call shquotequote,$(TESTFLAGS)) -singleproc 1 >> gdb.run
$(GDB) ./${TCLTEST_EXE} --command=gdb.run
rm gdb.run