<div dir="ltr"><div>Please apply this patch to "make" completion. This avoids completion getting confused on variables when a makefile is reloaded.</div><div><br></div><div>---</div><div> completions/make              | 10 +++++++---</div><div> test/fixtures/make/.gitignore |  1 +</div><div> test/fixtures/make/Makefile   |  5 +++++</div><div> test/lib/completions/make.exp |  2 +-</div><div> 4 files changed, 14 insertions(+), 4 deletions(-)</div><div> create mode 100644 test/fixtures/make/.gitignore</div><div><br></div><div>diff --git a/completions/make b/completions/make</div><div>index e84e5ba..ad1348b 100644</div><div>--- a/completions/make</div><div>+++ b/completions/make</div><div>@@ -20,9 +20,13 @@ function _make_target_extract_script()</div><div>     fi</div><div> </div><div>     cat <<EOF</div><div>-    1,/^# * Files/                d;            # skip until files section</div><div>-    /^# * Not a target/,/^$/      d;            # skip not target blocks</div><div>-    /^${prefix_pat}/,/^$/!        d;            # skip anything user dont want</div><div>+    1,/^# * Make data base/           d;        # skip any makefile output</div><div>+    /^# * Finished Make data base/,/^# * Make data base/{</div><div>+                                      d;        # skip any makefile output</div><div>+    }</div><div>+    /^# * Variables/,/^# * Files/     d;        # skip until files section</div><div>+    /^# * Not a target/,/^$/          d;        # skip not target blocks</div><div>+    /^${prefix_pat}/,/^$/!            d;        # skip anything user dont want</div><div> </div><div>     # The stuff above here describes lines that are not</div><div>     #  explicit targets or not targets other than special ones</div><div>diff --git a/test/fixtures/make/.gitignore b/test/fixtures/make/.gitignore</div><div>new file mode 100644</div><div>index 0000000..3d1325c</div><div>--- /dev/null</div><div>+++ b/test/fixtures/make/.gitignore</div><div>@@ -0,0 +1 @@</div><div>+extra_makefile</div><div>diff --git a/test/fixtures/make/Makefile b/test/fixtures/make/Makefile</div><div>index 3d1d5f3..c04602f 100644</div><div>--- a/test/fixtures/make/Makefile</div><div>+++ b/test/fixtures/make/Makefile</div><div>@@ -39,3 +39,8 @@ clean:</div><div> ifndef __BASH_MAKE_COMPLETION__</div><div> -include sample.d</div><div> endif</div><div>+</div><div>+extra_makefile: </div><div>+<span class="" style="white-space:pre">      </span>touch $@</div><div>+include extra_makefile</div><div>+</div><div>diff --git a/test/lib/completions/make.exp b/test/lib/completions/make.exp</div><div>index 93a53db..041ef86 100644</div><div>--- a/test/lib/completions/make.exp</div><div>+++ b/test/lib/completions/make.exp</div><div>@@ -21,7 +21,7 @@ sync_after_int</div><div> </div><div> set test "\"make <TAB>\" should complete targets"</div><div> set dir $::srcdir/fixtures/make</div><div>-set targets "all sample install clean"</div><div>+set targets "all sample install clean extra_makefile"</div><div> assert_complete_dir $targets "make " $dir $test</div><div> </div><div> </div><div>-- </div><div>2.5.0</div><div><br></div></div>