.RECIPEPREFIX 混淆了 Makefille 目标的自动完成

.RECIPEPREFIX confuses autocompletion for Makefille targets

没有.RECIPEPREFIX:

Makefile:

t1:
    ls

t2:
    ls

gmake 完成效果很好:

gmake [tab][tab]
Makefile  t1        t2        

.RECIPEPREFIX

Makefile:

.RECIPEPREFIX = >

t1:
> ls

t2:
> ls

它似乎没有任何作用,第二个目标 t2 没有出现:

gmake [tab][tab]
Makefile  t1        

问题

不知道是我的设置问题还是bash-completion,还是Make

我的bash-完成版:

bash-completion: stable 1.3 (bottled)

我的制作版本:

gmake --version
GNU Make 4.3
Built for x86_64-apple-darwin19.2.0

scop 的帮助下,我更新到 bash-completion@2

brew install bash-completion@2

并将我的登录名 bash 更改为 5 bash-completition@2 needs bash version to be ≥ 4 (following instruction on https://unix.stackexchange.com/a/196059/145789),

sudo chsh -s /usr/local/bin/bash [username]

现在可以使用了。