Mail Archives: djgpp-workers/2001/12/16/13:59:32
> > > > SHELL = /bin/sh
> > > > all:
> > > > MAKE="$(MAKE)"
> > This should just be a symbol substitution, ie make=make.
>
> That's true, but how do you expect Make to know about that? It
> doesn't; all it sees is a command line with some shell magic (the `='
> character), so it invokes Bash. Shell invocation goes through
> `system', which, in the case of Unixy shells, does that via temporary
> files. That's why I guessed that the problem is with the temporary
> file: after all, that's the only file that seems to be involved.
>
> Of course, this is all pure theory; I didn't have a chance to step
> with a debugger into Make or the library and see if I remember this
> stuff correctly.
No, that's right; I get
$TMPDIR/dj100000: $TMPDIR/dj100000: cannot execute binary file
so bash (well, presumably bash) is trying to run the temporary script.
In fact, put 'MAKE="make"' in a file called 'foo', and 'bash foo' will
give the same error.
Perhaps when invoking a Unixy shell through system, we should put
#! <value of $SHELL>
as the first line, so that it is a real script?
In fact, even just prepending a line containing only a '#' seems to
fix it.
- Raw text -