From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23729 invoked from network); 18 Aug 2004 20:23:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Aug 2004 20:23:48 -0000 Received: (qmail 32688 invoked from network); 18 Aug 2004 20:23:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Aug 2004 20:23:42 -0000 Received: (qmail 11311 invoked by alias); 18 Aug 2004 20:23:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20270 Received: (qmail 11300 invoked from network); 18 Aug 2004 20:23:30 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 18 Aug 2004 20:23:30 -0000 Received: (qmail 31913 invoked from network); 18 Aug 2004 20:21:32 -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; 18 Aug 2004 20:21:30 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id 4C44B266A; Wed, 18 Aug 2004 13:21:26 -0700 (PDT) Date: Wed, 18 Aug 2004 13:21:26 -0700 From: Wayne Davison To: zsh-workers@sunsite.dk Subject: [PATCH] more _make fixes Message-ID: <20040818202125.GA12088@blorf.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline 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=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm working on _make a little more, and I noticed that it outputs extra targets for "VAR := VALUE" lines. My fix is to add "([^=]|$)" after the ":" in each regex (the "|$" part is just paranoia in case someone put a useless target without rules or dependencies right at the end of the file). Attached is my patch. ..wayne.. --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="make.patch" --- _make 18 Aug 2004 17:10:27 -0000 1.5 +++ _make 18 Aug 2004 17:49:10 -0000 @@ -27,14 +27,14 @@ else if [[ $is_gnu = gnu ]] && zstyle -t ":completion:${curcontext}:targets" call-command; then if [[ -n $useperl ]]; then - cmdargs=(perl -F: -ane '/^[a-zA-Z0-9][^\/\t=]+:/ && print "$F[0]\n"') + cmdargs=(perl -F: -ane '/^[a-zA-Z0-9][^\/\t=]+:([^=]|$)/ && print "$F[0]\n"') else - cmdargs=(awk '/^[a-zA-Z0-9][^\/\t=]+:/ {print $1}' FS=:) + cmdargs=(awk '/^[a-zA-Z0-9][^\/\t=]+:([^=]|$)/ {print $1}' FS=:) fi tmp=( $(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null | $cmdargs) ) elif [[ -n $useperl ]]; then tmp=( - $(perl -ne '@matches = /^(?:([a-zA-Z0-9]+[^\/\t=\s]+)\s*)+:/ and + $(perl -ne '@matches = /^(?:([a-zA-Z0-9]+[^\/\t=\s]+)\s*)+:([^=]|$)/ and print join(" ", @matches), "\n"; if (/^\.include\s+\/ || /^\.include\s+\".*mk\/bsd\.pkg\.(subdir\.)?mk\"/) { @@ -44,7 +44,7 @@ if (/^\.include\s+\/ || /^\.include *".*mk\/bsd\.pkg\.(subdir\.)?mk"/ { print "fetch fetch-list extract patch configure build install reinstall deinstall package describe checkpatch checksum makesum" }' \ FS=: $file) --mP3DRpeJDSE+ciuQ--