Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh make(1) completion on FreeBSD
- X-seq: zsh-workers 39581
- From: Guilherme Salazar <gmesalazar@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh make(1) completion on FreeBSD
- Date: Wed, 5 Oct 2016 23:56:52 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=RjvvWS3iSUEdjeTy/s81GiMRTsZM7QgINBQLTnHPS7A=; b=RK19HMN+6q+kk/9xIteoZvGHL7QLivo5s6Czz+j3f/KnN8eM4grSQqmGTgIfpppYGN uY/4ymt3SHitC78zGlN9S92FSemGnk+ce40/jJzOtSgLpsx71sDvljjYiRBPe2gXZG4w WS/DsWl52BozAtLV4vrpinx/XQuSju+EtBfORxunErtjIi1oCbEhq0uljzv6ChvmN5lj IaitAPwdFrjCUI3nbLmeZGQVGDXhRzYQ9VZKr6xv6hsKOWaAh+OePNSsj9U5iImgnRdL bdKFDkW/GnV7UZVpRMLagRcUYRmx7pyGqo4o7mKinE1vyp3WyBYluDL9NlkLKh3tp5GH c11A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hey,
The _make completion script has the following snippet:
case "$OSTYPE" in
freebsd*)
_make-parseMakefile $PWD < <(_call_program targets "$words[1]"
-nsp -f "$file" 4| .PHONY 2> /dev/null)
;;
That is, _call_program invokes the make command ($words[1]) with the
given options (-nsp...) to get the make database. The issue is the
default make utility in FreeBSD is not GNU Make and it does not
support these options; to get something in FreeBSD make, we could use
the -d option (for debugging), along with A (for all) -- see [1] for
details.
If one has gmake installed, one can replace "$words[1]" with gmake or
g"$words[1]" to have gmake dump the database info, but I'm not sure
it's the ideal solution.
[1] https://www.freebsd.org/cgi/man.cgi?query=make&apropos=0&sektion=1&manpath=FreeBSD+11-current&arch=default&format=html
Cheers,
G. Salazar
Messages sorted by:
Reverse Date,
Date,
Thread,
Author