From: Wayne Davison <wayned@users.sourceforge.net>
To: Peter Stephenson <pws@csr.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: [joshk@triplehelix.org: Bug#271196: makefile completion catches some delayed expansions as targets]
Date: Fri, 1 Oct 2004 10:39:32 -0700 [thread overview]
Message-ID: <20041001173932.GB26529@blorf.net> (raw)
In-Reply-To: <200409300945.i8U9ixPZ016740@news01.csr.com>
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..
next prev parent reply other threads:[~2004-10-01 17:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-11 23:16 Clint Adams
2004-09-11 23:32 ` Clint Adams
2004-09-11 23:47 ` Clint Adams
2004-09-12 3:24 ` Clint Adams
2004-09-29 22:39 ` Wayne Davison
2004-09-30 4:25 ` Bart Schaefer
2004-09-30 5:10 ` Bug#271196: makefile completion catches Geoff Wing
2004-09-30 9:44 ` [joshk@triplehelix.org: Bug#271196: makefile completion catches some delayed expansions as targets] Peter Stephenson
2004-10-01 17:39 ` Wayne Davison [this message]
2004-10-01 18:27 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041001173932.GB26529@blorf.net \
--to=wayned@users.sourceforge.net \
--cc=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).