pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk use GREP and SED as set by defs.opsys.mk so th...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb1014992d01
branches:  trunk
changeset: 466381:bb1014992d01
user:      grant <grant%pkgsrc.org@localhost>
date:      Sat Jan 17 03:39:35 2004 +0000

description:
use GREP and SED as set by defs.opsys.mk so this works on non-NetBSD.

diffstat:

 mk/bulk/printdepends |  23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diffs (53 lines):

diff -r 6e5f416bec1f -r bb1014992d01 mk/bulk/printdepends
--- a/mk/bulk/printdepends      Sat Jan 17 01:15:04 2004 +0000
+++ b/mk/bulk/printdepends      Sat Jan 17 03:39:35 2004 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: printdepends,v 1.12 2003/12/10 13:59:06 sketch Exp $
+# $NetBSD: printdepends,v 1.13 2004/01/17 03:39:35 grant Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%netbsd.org@localhost>
@@ -44,12 +44,26 @@
        brokenfile=/dev/null
 fi
 
+opsys=`uname -s`
+case "$opsys" in
+NetBSD)        BMAKE=make ;;
+*)     BMAKE=bmake ;;
+esac
+
+export BMAKE
+
 # $USR_PKGSRC
 cwd=$PWD
 
+# get some initial variables
+cd $cwd/pkgtools/pkglint
+GREP=`${BMAKE} show-var VARNAME=GREP`
+SED=`${BMAKE} show-var VARNAME=SED`
+cd $cwd
+
 # List of all pkgs, from pkgsrc/*/Makefile
- list=`grep '^[[:space:]]*'SUBDIR */Makefile | sed 's,/Makefile.*=[[:space:]]*,/,'`
-#list=`grep '^[^#].*'SUBDIR ma*/Makefile | sed 's,/Makefile.*= *,/,'`
+list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'`
+#list=`${GREP} '^[^#].*'SUBDIR ma*/Makefile | ${SED} 's,/Makefile.*= *,/,'`
 #list=x11/gnome
 #list='x11/xteddy x11/xsnow'
 
@@ -57,7 +71,7 @@
 do
        if [ ! -d $pkgdir ]; then
                echo "WARNING:  the package directory $pkgdir is listed in" > /dev/stderr
-               echo $pkgdir | sed 's;/.*;/Makefile;g' > /dev/stderr
+               echo $pkgdir | ${SED} 's;/.*;/Makefile;g' > /dev/stderr
                echo "but the directory does not exist.  Please fix this!" > /dev/stderr
        else
                cd $pkgdir
@@ -85,4 +99,3 @@
        fi
        cd $cwd
 done
-



Home | Main Index | Thread Index | Old Index