summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_make12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c85d15a5a..71329ac4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-04-28  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* Jared Ahern: 34980: Completion/Unix/Command/_make: match
+	additional forms of assignment in makefiles.
+
 	* 34979: Src/exec.c: preserve job text in shell job fix code.
 
 	* 34977: Src/zsh.mdd: more reliable test for whether
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index e5a513f64..225c0af85 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -64,18 +64,18 @@ _make-parseMakefile () {
   while read input
   do
     case "$input " in
-      # VARIABLE = value
-      ([[:alnum:]][[:alnum:]_]#[ $TAB]#=*)
-      var=${input%%[ $TAB]#=*}
+      # VARIABLE = value OR VARIABLE ?= value
+      ([[:alnum:]][[:alnum:]_]#[ $TAB]#(\?|)=*)
+      var=${input%%[ $TAB]#(\?|)=*}
       val=${input#*=}
       val=${val##[ $TAB]#}
       VARIABLES[$var]=$val
       ;;
 
-      # VARIABLE := value
+      # VARIABLE := value OR VARIABLE ::= value
       # Evaluated immediately
-      ([[:alnum:]][[:alnum:]_]#[ $TAB]#:=*)
-      var=${input%%[ $TAB]#:=*}
+      ([[:alnum:]][[:alnum:]_]#[ $TAB]#:(:|)=*)
+      var=${input%%[ $TAB]#:(:|)=*}
       val=${input#*=}
       val=${val##[ $TAB]#}
       val=$(_make-expandVars $val)