Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

make _make works at finding targets with freebsd's make



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
From dc5e357927db945ebdb130ee12c0a48ff006cfef Mon Sep 17 00:00:00 2001
From: Bapt <baptiste.daroussin@xxxxxxxxx>
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



Messages sorted by: Reverse Date, Date, Thread, Author