1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-07-08 15:51:34 +02:00

39654: (based on patch by Baptiste Daroussin) Better support bmake, FreeBSD's default make(1) implementation.

Don't pass gmake options to bmake.

Add bmake-speciic codepath for completing targets and parsing the makefile.
This commit is contained in:
Daniel Shahaf 2016-10-16 16:34:26 +00:00
parent ae3b675ce6
commit ecc0a5ece2
2 changed files with 16 additions and 9 deletions
ChangeLog
Completion/Unix/Command

View file

@ -1,5 +1,9 @@
2016-10-18 Daniel Shahaf <d.s@daniel.shahaf.name>
* 39654: Completion/Unix/Command/_make: (based on patch by
Baptiste Daroussin) Better support bmake, FreeBSD's default
make(1) implementation.
* 39657: Completion/Zsh/Command/_zstyle: Complete the -g,
-s,-b,-a, -t,-T, -m options.

View file

@ -263,17 +263,20 @@ _make() {
if [[ -n "$file" ]]
then
if [[ $is_gnu == gnu ]] && zstyle -t ":completion:${curcontext}:targets" call-command
if [[ $is_gnu == gnu ]]
then
_make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
else
case "$OSTYPE" in
freebsd*)
_make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp -f "$file" .PHONY 2> /dev/null)
;;
*)
if zstyle -t ":completion:${curcontext}:targets" call-command; then
_make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
else
_make-parseMakefile $PWD < $file
esac
fi
else
if [[ $OSTYPE == (freebsd|dragonfly|netbsd)* || /$words[1] == */bmake* ]]; then
TARGETS+=(${=${(f)"$(_call_program targets "$words[1]" -s -f "$file" -V.ALLTARGETS 2> /dev/null)"}})
_make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsdg1Fstdout -f "$file" .PHONY 2> /dev/null)
else
_make-parseMakefile $PWD < $file
fi
fi
fi