From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17452 invoked from network); 7 Apr 2000 16:56:12 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Apr 2000 16:56:12 -0000 Received: (qmail 16889 invoked by alias); 7 Apr 2000 16:55:34 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3013 Received: (qmail 16746 invoked from network); 7 Apr 2000 16:55:29 -0000 From: "Bart Schaefer" Message-Id: <1000407165517.ZM21549@candle.brasslantern.com> Date: Fri, 7 Apr 2000 16:55:16 +0000 In-Reply-To: Comments: In reply to Francis GALIEGUE "RPM completion in dev19 and a suggested change to make completion" (Apr 7, 1:19pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Francis GALIEGUE , zsh-users@sunsite.auc.dk Subject: Re: RPM completion in dev19 and a suggested change to make completion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 7, 1:19pm, Francis GALIEGUE wrote: } Subject: RPM completion in dev19 and a suggested change to make completion } } The other suggestion I have is to allow make completion to take GNU } make in acknowledgement: [...] } With this, for example, make in the kernel sources "sees" target } bzImage while it doesn't see it in the original version. Comments? Random pot-shot: I think if the linux kernel build process is going to rely on GNU make features, the Makefile ought to be named GNUmakefile so that (a) other makes won't try to read it and (b) we could tell from the file name whether to attempt "make -p" or the like. However, given how unlikely it is that this will happen any time soon, how about the following (not committed to SourceForge due to controversy). Even if we don't use the "make -nsp ..." part, we should add "=" to the characters that aren't allowed to appear before the ":" -- I found it was completing assignments of the form WWW_HOME = http (because "WWW_HOME = http://blahblahblah" matched the pattern). Index: Completion/User/_make =================================================================== @@ -14,17 +14,23 @@ file=Makefile elif [[ -e makefile ]]; then file=makefile + elif [[ -e GNUmakefile ]]; then + file=GNUmakefile else file='' fi if [[ -n "$file" ]] && _wanted targets; then - tmp=( - $(awk '/^[a-zA-Z0-9][^\/\t]+:/ {print $1} + if [[ "$words[CURRENT]" = *gmake ]] || grep '^include ' "$file" >&/dev/null; then + tmp=( $(make -nsp --no-print-directory -f "$file" | awk '/^[a-zA-Z0-9][^\/\t=]+:/ {print $1}' FS=:) ) + else + tmp=( + $(awk '/^[a-zA-Z0-9][^\/\t=]+:/ {print $1} /^\.include */ || /^\.include *".*mk\/bsd\.pkg\.(subdir\.)?mk"/ { print "fetch fetch-list extract patch configure build install reinstall deinstall package describe checkpatch checksum makesum" }' \ FS=: $file) - ) + ) + fi _all_labels targets expl 'make target' compadd "$tmp[@]" && return 0 fi compset -P 1 '*=' -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com