zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: zsh-workers@sunsite.dk
Subject: [PATCH] more _make fixes
Date: Wed, 18 Aug 2004 13:21:26 -0700	[thread overview]
Message-ID: <20040818202125.GA12088@blorf.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

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..

[-- Attachment #2: make.patch --]
[-- Type: text/plain, Size: 1522 bytes --]

--- _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+\<bsd\.port\.(subdir\.|pre\.)?mk>/ ||
     /^\.include\s+\".*mk\/bsd\.pkg\.(subdir\.)?mk\"/) {
@@ -44,7 +44,7 @@ if (/^\.include\s+\<bsd\.port\.(subdir\.
 	)
     else
       tmp=(
-            $(awk '/^[a-zA-Z0-9][^\/\t=]+:/ {print $1}
+            $(awk '/^[a-zA-Z0-9][^\/\t=]+:([^=]|$)/ {print $1}
  	      /^\.include  *<bsd\.port\.(subdir\.|pre\.)?mk>/ || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.)?mk"/ {
  	        print "fetch fetch-list extract patch configure build install reinstall deinstall package describe checkpatch checksum makesum" }' \
  	     FS=: $file)

             reply	other threads:[~2004-08-18 20:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-18 20:21 Wayne Davison [this message]
2004-08-18 20:43 ` Wayne Davison

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=20040818202125.GA12088@blorf.net \
    --to=wayned@users.sourceforge.net \
    --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).