Message-Id: <200004111902.PAA07351@qnx.com> Subject: Re: Porting problems with Sh-utils (beta) To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Tue, 11 Apr 2000 15:01:52 -0400 (EDT) From: "Alain Magloire" Cc: djgpp-workers AT delorie DOT com In-Reply-To: from "Eli Zaretskii" at Apr 11, 2000 01:21:34 PM X-Mailer: ELM [version 2.5 PL0b1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Precedence: bulk > > > On Mon, 10 Apr 2000, Alain Magloire wrote: > > > Sorry, I did not follow the thread(no email for a while) > > You could find it by searching at this URL: > > http://www.delorie.com/djgpp/mail-archives/ > I did not have the patience to go to all, that link is so slooooow. But it seems to me, at first glance, like a parsing bug in the shell(bash). In Prashant example: # source='There is no bug in BASH!' sh ./script echo `echo`script executed It seems, ${source} was simply not set in the environmenti, after the execution of `echo`. A simple workaround would be not to use the shell parsing and rather "env" something like below should work # env source='There is no bug in BASH!' sh ./script echo `echo`script executed Now the burden is on "env" to parse for '=' and set the environment before exec() the rest of the line. So the shell will first execute `echo` and past the expanded line to "env" to do the job. Another would be to rewrite the line completly: # source='There is no bug in BASH!'; export source; \ sh ./script echo `echo`script executed So the faulty parsing is bypass. You may submit(merely a suggestion) a patch like this to Jim. # where @ENV@ is expanded with a check # to AC_PATH_PROGS(ENV, env) or something similar ENV = @ENV@ all: $(ENV) source='$<' object='$@' libtool=no \ .... But this look like it was generated by automake/libtool so maybe those tools should cope with this strange behaviour of the shell. -- au revoir, alain ---- Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!