zsh-workers
 help / color / mirror / code / Atom feed
* make _make works at finding targets with freebsd's make
@ 2009-11-24 15:28 Baptiste Daroussin
  2009-11-25  0:25 ` Michael Hwang
  0 siblings, 1 reply; 2+ messages in thread
From: Baptiste Daroussin @ 2009-11-24 15:28 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

Hi,

Here is a patch to make _make work at finding (so completing) targets using
freebsd's make
unfortunatly bsdmake are different on netbsd and openbsd so that only works on
freebsd.

I don't know if the case is the right way to do that, I did it to prepare the
case for NetBSD and OpenBSD

regards,
Bapt

[-- Attachment #2: 0001-Add-support-for-FreeBSD-s-make.patch --]
[-- Type: text/x-diff, Size: 916 bytes --]

>From dc5e357927db945ebdb130ee12c0a48ff006cfef Mon Sep 17 00:00:00 2001
From: Bapt <baptiste.daroussin@gmail.com>
Date: Tue, 24 Nov 2009 16:22:18 +0100
Subject: [PATCH] Add support for FreeBSD's make

---
 Completion/Unix/Command/_make |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index f0d2088..e404d16 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -193,7 +193,13 @@ else
     then
       parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
     else
-      parseMakefile $PWD < $file
+      case "$OSTYPE" in
+        freebsd*)
+        parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp -f "$file" .PHONY 2> /dev/null)
+	;;
+	*)
+        parseMakefile $PWD < $file
+      esac
     fi
   fi
 
-- 
1.6.4.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: make _make works at finding targets with freebsd's make
  2009-11-24 15:28 make _make works at finding targets with freebsd's make Baptiste Daroussin
@ 2009-11-25  0:25 ` Michael Hwang
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Hwang @ 2009-11-25  0:25 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

I think it's best to use _pick_variant to decide the version of make.
Unfortunately, I don't have access to anything other than GNU make, so
you may need to change the freebsd=FreeBSD pattern in the
_pick_variant line.

The original line was "_pick_variant -r is_gnu gnu=GNU unix -v -f". Is
that last "-f" a mistake? I removed it for this patch, but I'm not
sure if that'll affect other versions of make.

Michael Hwang

On Tue, Nov 24, 2009 at 10:28 AM, Baptiste Daroussin
<baptiste.daroussin@gmail.com> wrote:
> Hi,
>
> Here is a patch to make _make work at finding (so completing) targets using
> freebsd's make
> unfortunatly bsdmake are different on netbsd and openbsd so that only works on
> freebsd.
>
> I don't know if the case is the right way to do that, I did it to prepare the
> case for NetBSD and OpenBSD
>
> regards,
> Bapt
>



-- 
Michael Hwang

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-25  0:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-24 15:28 make _make works at finding targets with freebsd's make Baptiste Daroussin
2009-11-25  0:25 ` Michael Hwang

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).