2023-10-04 15:49:08 +03:00
|
|
|
# Fail with an error if the TCLSH named in $2 is not tclsh version $1 or later.
|
2023-10-04 14:52:44 +03:00
|
|
|
#
|
2023-10-04 15:49:08 +03:00
|
|
|
echo "set vers $1" >cktclsh$1.tcl
|
|
|
|
echo 'if {$tcl_version<$vers} {exit 1}' >>cktclsh$1.tcl
|
|
|
|
if ! $2 cktclsh$1.tcl
|
2023-10-04 14:52:44 +03:00
|
|
|
then
|
2023-10-04 15:49:08 +03:00
|
|
|
echo "ERROR: This makefile target requires tclsh $1 or later."
|
|
|
|
rm cktclsh$1.tcl
|
2023-10-04 14:52:44 +03:00
|
|
|
exit 1
|
|
|
|
fi
|
2023-10-04 15:49:08 +03:00
|
|
|
rm cktclsh$1.tcl
|