Use correct makefile for target completion

This commit is contained in:
Aske Bækdal Møller 2021-01-16 10:37:26 +01:00
parent 244cbfc832
commit 3511fb04db
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ _cmake_targets() {
then
# `make help` doesn't work for Makefiles in general, but for CMake generated Makefiles it does.
i=1
for target in $(make help | \grep -e "\.\.\." | sed "s/\.\.\. //" | sed "s/ (the default.*//") ; do
for target in $(make -f $1/Makefile help | \grep -e "\.\.\." | sed "s/\.\.\. //" | sed "s/ (the default.*//") ; do
targets[$i]=$target
(( i = $i + 1 ))
done