mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-12 01:11:27 +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:
parent
ae3b675ce6
commit
ecc0a5ece2
2 changed files with 16 additions and 9 deletions
|
@ -1,5 +1,9 @@
|
||||||
2016-10-18 Daniel Shahaf <d.s@daniel.shahaf.name>
|
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,
|
* 39657: Completion/Zsh/Command/_zstyle: Complete the -g,
|
||||||
-s,-b,-a, -t,-T, -m options.
|
-s,-b,-a, -t,-T, -m options.
|
||||||
|
|
||||||
|
|
|
@ -263,17 +263,20 @@ _make() {
|
||||||
|
|
||||||
if [[ -n "$file" ]]
|
if [[ -n "$file" ]]
|
||||||
then
|
then
|
||||||
if [[ $is_gnu == gnu ]] && zstyle -t ":completion:${curcontext}:targets" call-command
|
if [[ $is_gnu == gnu ]]
|
||||||
then
|
then
|
||||||
|
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)
|
_make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
|
||||||
else
|
else
|
||||||
case "$OSTYPE" in
|
|
||||||
freebsd*)
|
|
||||||
_make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp -f "$file" .PHONY 2> /dev/null)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
_make-parseMakefile $PWD < $file
|
_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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue