Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh make(1) completion on FreeBSD
- X-seq: zsh-workers 39610
 
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
 
- To: Guilherme Salazar <gmesalazar@xxxxxxxxx>
 
- Subject: Re: zsh make(1) completion on FreeBSD
 
- Date: Tue, 11 Oct 2016 21:21:50 +0000
 
- Cc: zsh-workers@xxxxxxx
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	daniel.shahaf.name; h=cc:content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=pYPHeV9bZ3QVXSwS	Wo6a9sGyITs=; b=QX9e0C+XMaXVZgcrqRskqdrDEze7fMB626MTrxIDybKKsdx3	PISCo+D1guAJ4bEAWCgFbemCJtSJZCHQ5EFCs9jBzD9eocrY0D9VUi47Ijl8+Mch	alN9UTGkw72+hMqedQrxq7BDtFIf/AY1tbQX1QWrYSqFlAkOTn5rZGxgJU8=
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	messagingengine.com; h=cc:content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=pYPHeV9bZ3QVXSw	SWo6a9sGyITs=; b=bc2dG4hbsABtjtnDYchB3Nf3s1ifBdKYfyHU4r/GTCDe6tD	t+WarSqVxYV+IS8+y6IjTuk+R7BXAlK6ei3x81uZGeeOvwtfxbJzvoWsIKLhRpV6	DBUoRu5YrSPcsd1X73bWauxGY0mQavS9OcF1P5uW4AxIy6Midyad4nWLRqP0=
 
- In-reply-to: <CA+Hmt2iOypn5PDukmM3TH1=g-194QC_6FLVeaM-U0vFG1YbO7w@mail.gmail.com>
 
- 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
 
- References: <CA+Hmt2iOypn5PDukmM3TH1=g-194QC_6FLVeaM-U0vFG1YbO7w@mail.gmail.com>
 
Guilherme Salazar wrote on Wed, Oct 05, 2016 at 23:56:52 -0300:
> 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.
> 
I'd like to see this fixed but I'm not on FreeBSD right now.  Any chance
you could write a patch?  I think there are two approaches, either (a)
figure out what incantation of BSD make is equivalent to «gmake -nspf
$file», or (b) use the -d switch to ask make what are the targets,
variables, and other things that _make-parseMakefile extracts.
> 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.
> 
g$words[1] won't work when $words[1] is "/usr/bin/make", and in any case
I'd be concerned about syntaxes that are valid to BSD make but not to
GNU make; there are bound to be numerous instances of that in the ports
tree.
Thanks,
Daniel
> [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