I need to pass an argument to the tcl from command line (this is done by a make target)
But I cannot run this script using tclsh. I have to source this file as a command line option of a binary file.
So when I do this,
home/bin/abc -do my.tcl ARG
binary errors out as it has an illegal option. Fair enough.
What other way can I pass this arg to the tcl script?
I can set the arg as an env variable in the makefile and read it from inside the tcl script. But this is not a proper soln, as I don't want to mess with env variables.
Any suggestions? Your help is much appreciated.
But I cannot run this script using tclsh. I have to source this file as a command line option of a binary file.
So when I do this,
home/bin/abc -do my.tcl ARG
binary errors out as it has an illegal option. Fair enough.
What other way can I pass this arg to the tcl script?
I can set the arg as an env variable in the makefile and read it from inside the tcl script. But this is not a proper soln, as I don't want to mess with env variables.
Any suggestions? Your help is much appreciated.