From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12751 invoked from network); 19 Mar 2001 18:28:58 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Mar 2001 18:28:58 -0000 Received: (qmail 14670 invoked by alias); 19 Mar 2001 18:28:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13670 Received: (qmail 14658 invoked from network); 19 Mar 2001 18:28:48 -0000 From: "Bart Schaefer" Message-Id: <1010319182718.ZM14091@candle.brasslantern.com> Date: Mon, 19 Mar 2001 18:27:18 +0000 In-Reply-To: <200103190934.KAA01031@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: `make' completion in zsh-3.1.9" (Mar 19, 10:34am) References: <200103190934.KAA01031@beta.informatik.hu-berlin.de> In-Reply-To: Comments: In reply to Peter Stephenson "Re: `make' completion in zsh-3.1.9" (Mar 19, 10:17am) X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: `make' completion in zsh-3.1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 19, 10:34am, Sven Wischnowsky wrote: } } At least we shouldn't let it out of the door in a state where people } might have to set a barely documented style to keep it from doing such } horrible things. On Mar 19, 10:17am, Peter Stephenson wrote: } Subject: Re: `make' completion in zsh-3.1.9 } } This passed me by, and it obviously needs changing, but the awk stuff } is a bit minimal. The reason for invoking "make -nsp ..." appears to be to get "include" lines to be processed, with conditionals like "ifdef" and "ifeq" as a secondary consideration. The problem seems to be that "make -n" doesn't really mean what it says -- make will still execute its internal rules for building other makefiles, even though it won't execute the commands for building explicit non-makefile targets. Unfortunately I don't see any reasonable workaround. I toyed with a little function to do simple "include" processing, but it chokes when the include line mentions a make variable (such as $(ARCH) in the linux sources). It might be possible to write something that emulates make to the extent of being able to deal with this, but even in Perl I'm not too keen on attempting it. So we may be stuck with the awk we have, except that we could unfold any backslash-continued lines before awking. That'd be as easy as adding a "while read -e; do : done" to the command substitution. (Or at least I though it would, but: zsh% while read -e; do :; done < Makefile | less hangs until interrupted. This works: zsh% { while read -e; do :; done < Makefile } | less What's up with that first one?) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net