On Mon, Jul 21, 2008 at 3:18 PM, Garrett Cooper <[EMAIL PROTECTED]> wrote:
...
> Something like this works when sh is present at least:
>
> override SHELL := sh -c "exec tclsh '$0' ${1+'$@'}"

Umm, no, no it doesn't.  If you're going to propose something weird
like that, please test it before sending your message.

$ cat Makefile
override SHELL := sh -c "exec tclsh '$0' ${1+'$@'}"
all:
        puts foo
$ gmake
puts foo
couldn't read file "": no such file or directory
gmake: *** [all] Error 1
$

The problem is this: make expects to be able to pass commands to
$SHELL on the command line, NOT as a file of commands to execute.  In
particular, when you write

all:
        puts foo

make executes "$SHELL -c 'puts foo'".  Tclsh does *NOT* have a builtin
option that makes it execute stuff from its command line instead of
reading from a file.  If you *really* wanted to use tclsh as make's
$SHELL, you would have to include a tclsh script in your package that
would accept the -c option and parse and execute the next argument as
a set of (tcl) commands.


Philip Guenther


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to