From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18923 invoked from network); 1 Oct 2004 17:39:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Oct 2004 17:39:44 -0000 Received: (qmail 86048 invoked from network); 1 Oct 2004 17:39:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Oct 2004 17:39:38 -0000 Received: (qmail 19251 invoked by alias); 1 Oct 2004 17:39:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20434 Received: (qmail 19236 invoked from network); 1 Oct 2004 17:39:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Oct 2004 17:39:34 -0000 Received: (qmail 85776 invoked from network); 1 Oct 2004 17:39:34 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO binome.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 1 Oct 2004 17:39:33 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id 2ADAD3145; Fri, 1 Oct 2004 10:39:32 -0700 (PDT) Date: Fri, 1 Oct 2004 10:39:32 -0700 From: Wayne Davison To: Peter Stephenson Cc: zsh-workers@sunsite.dk Subject: Re: [joshk@triplehelix.org: Bug#271196: makefile completion catches some delayed expansions as targets] Message-ID: <20041001173932.GB26529@blorf.net> References: <20040911231628.GA17128@scowler.net> <20040911233227.GA17389@scowler.net> <20040911234745.GA17562@scowler.net> <20040912032458.GA20842@scowler.net> <20040929223945.GB7866@blorf.net> <200409300945.i8U9ixPZ016740@news01.csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409300945.i8U9ixPZ016740@news01.csr.com> User-Agent: Mutt/1.5.6+20040722i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 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..