delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/04/10/10:27:26

Date: Mon, 10 Apr 2000 17:00:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Porting problems with Sh-utils (beta)
In-Reply-To: <38F1A726.23834.332F7B@localhost>
Message-ID: <Pine.SUN.3.91.1000410165821.24866E-100000@is>
MIME-Version: 1.0
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

On Mon, 10 Apr 2000, Mark E. wrote:

> Add:
> echo "${1+$@}"
> 
> run 'make' and you'll see what's going on. The line continutation shown below 
> tricks Bash into treating 'echo `echo` script executed' as an argument 
> belonging to the previous command instead of treating it like a new command.

I understood that just from reading the command, but I still don't grasp 
why does this cause the $source variable to lose its value.  What am I 
missing?

> I'd recommend changing the makefile from:
> > 
> > all:
> > 	source='There is no bug in BASH!' \
> > 	$(SHELL) ./script \
> > 	echo `echo`script executed
> 
> to
> 
> > 
> > all:
> > 	source='There is no bug in BASH!' \
> > 	$(SHELL) ./script
> > 	echo `echo`script executed

I think the Makefile actually _wants_ this to be a single line.  Is 
anything wrong with that?  I understand that it works on Unix unaltered.

- Raw text -


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