delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/16/13:59:32

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>, <sandmann AT clio DOT rice DOT edu>
Cc: <snowball3 AT bigfoot DOT com>, <acottrel AT ihug DOT com DOT au>
Subject: Re: The Bash 2.05 fixinc.sh bug
Date: Sun, 16 Dec 2001 19:59:45 +0100
Message-ID: <000d01c18663$d41d9f80$d13276d5@pandora.be>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2627
In-Reply-To: <1858-Sun16Dec2001200955+0200-eliz@is.elta.co.il>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
Importance: Normal
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> > > > 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019