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]
- X-seq: zsh-workers 20434
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: [joshk@xxxxxxxxxxxxxxx: Bug#271196: makefile completion catches some delayed expansions as targets]
- Date: Fri, 1 Oct 2004 10:39:32 -0700
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <200409300945.i8U9ixPZ016740@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20040911231628.GA17128@xxxxxxxxxxx> <20040911233227.GA17389@xxxxxxxxxxx> <20040911234745.GA17562@xxxxxxxxxxx> <20040912032458.GA20842@xxxxxxxxxxx> <20040929223945.GB7866@xxxxxxxxx> <200409300945.i8U9ixPZ016740@xxxxxxxxxxxxxx>
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?
One option that could make this better is to not expand variables that
are not set. Thus, in the case of the $(EXEEXT) var (since it is
usually set to an empty string) it would get expanded. In your cited
case (if CONFIG was not set) the target would be returned unchanged.
The only drawback I see to this is that some folks might be depending on
the fact that an unset variable is just as good as an empty variable in
a makefile. However, since there would be a work-around for such
situations (by setting the variable to an empty value), I could live
with that behavior. Thoughts?
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author