Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [joshk@xxxxxxxxxxxxxxx: Bug#271196: makefile completion catches some delayed expansions as targets]



Wayne Davison wrote:
> On Thu, Sep 30, 2004 at 10:44:59AM +0100, Peter Stephenson wrote:
> > I did notice that this target:
> >   builds/$(CONFIG)/stamp-builddir
> > gets shortened to
> >   builds//stamp-builddir
> > 
> > I realise there it's not likely to be able to do the substitution
> > properly, but I'm not sure why it's doing it at all.
> 
> I wanted substitutions for targets such as this:
> 
> rsync$(EXEEXT): ...
> 
> so that completion returns either "rsync" or "rsync.exe", as
> appropriate.  I'm surprised that the makefile you cited didn't set
> CONFIG somewhere inside it.  Perhaps it was in an include that didn't
> get processed?

I can see your behaviour's more use, I didn't realise it was expanding
rather than removing the variables.  The makefile in question calls
itself recursively, so it's hard to predict how CONFIG will be set.  So
I don't think this needs any fundamental change.

It would be quite nice if it got set on

make CONFIG=foo <TAB>

however.  Maybe that's not too hard to add.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author