[Bash-completion-commits] [bash-completion] 01/01: make: Fix detection of intermediate targets where make has changed its database whitespace

Ville Skyttä scop-guest at moszumanska.debian.org
Mon May 18 17:49:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit 4b209b0b172ddecff1e9aaf5de9ea64267fb9053
Author: Tristan Wibberley <tristan.wibberley at gmail.com>
Date:   Sun May 17 14:57:37 2015 +0100

    make: Fix detection of intermediate targets where make has changed its database whitespace
---
 completions/make            | 6 +++---
 test/fixtures/make/Makefile | 6 ++++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/completions/make b/completions/make
index 53f362e..3f697be 100644
--- a/completions/make
+++ b/completions/make
@@ -20,8 +20,8 @@ function _make_target_extract_script()
     fi
 
     cat <<EOF
-    1,/^# Files/                  d;            # skip until files section
-    /^# Not a target/,/^$/        d;            # skip not target blocks
+    1,/^# * Files/                d;            # skip until files section
+    /^# * Not a target/,/^$/      d;            # skip not target blocks
     /^${prefix_pat}/,/^$/!        d;            # skip anything user dont want
 
     # The stuff above here describes lines that are not
@@ -29,7 +29,7 @@ function _make_target_extract_script()
     # The stuff below here decides whether an explicit target
     #  should be output.
 
-    /^# File is an intermediate prerequisite/ {
+    /^# * File is an intermediate prerequisite/ {
       s/^.*$//;x;                               # unhold target
       d;                                        # delete line
     }
diff --git a/test/fixtures/make/Makefile b/test/fixtures/make/Makefile
index d5a0012..1a59f21 100644
--- a/test/fixtures/make/Makefile
+++ b/test/fixtures/make/Makefile
@@ -6,8 +6,10 @@ NAME := sample
 .PHONY: all
 all: $(NAME)
 
-$(NAME): sample.c
-	cc -o $@ $^
+$(NAME): sample.o
+
+.INTERMEDIATE: sample.o
+sample.o: sample.c
 
 .PHONY: install
 install: all

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list