pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk allow the user to set the packages to build in...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9fa1fa4a6d97
branches:  trunk
changeset: 467368:9fa1fa4a6d97
user:      grant <grant%pkgsrc.org@localhost>
date:      Fri Jan 30 10:54:36 2004 +0000

description:
allow the user to set the packages to build in build.conf (PKGLIST).

cache the list in printdepends so that printindex doesn't need to
run the same command(s) again at the start of a bulk build.

diffstat:

 mk/bulk/build.conf-example |   5 ++++-
 mk/bulk/printdepends       |  23 +++++++++++++++++------
 mk/bulk/printindex         |  11 +++++++----
 3 files changed, 28 insertions(+), 11 deletions(-)

diffs (88 lines):

diff -r 0687c4808a1e -r 9fa1fa4a6d97 mk/bulk/build.conf-example
--- a/mk/bulk/build.conf-example        Fri Jan 30 08:51:29 2004 +0000
+++ b/mk/bulk/build.conf-example        Fri Jan 30 10:54:36 2004 +0000
@@ -1,9 +1,12 @@
 # build.conf
-# $NetBSD: build.conf-example,v 1.14 2003/03/09 15:46:00 cjep Exp $
+# $NetBSD: build.conf-example,v 1.15 2004/01/30 10:54:36 grant Exp $
 #
 # config file in /bin/sh syntax for {,pre,post}-build
 #
 
+# List of package directories to build.
+# Defaults to all packages if PKLIST is empty or undefined.
+#PKGLIST="www/mozilla meta-pkgs/kde3"
 
 # Some paths for output files and paths to log files
 FTPx=`date +%Y%m%d.%H%M`
diff -r 0687c4808a1e -r 9fa1fa4a6d97 mk/bulk/printdepends
--- a/mk/bulk/printdepends      Fri Jan 30 08:51:29 2004 +0000
+++ b/mk/bulk/printdepends      Fri Jan 30 10:54:36 2004 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: printdepends,v 1.13 2004/01/17 03:39:35 grant Exp $
+# $NetBSD: printdepends,v 1.14 2004/01/30 10:54:36 grant Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%netbsd.org@localhost>
@@ -38,6 +38,13 @@
 # to contain any failure messages in each package directory.
 #
 
+# Pull in PKGLIST
+if [ -f "$BULK_BUILD_CONF" ]; then
+       . $BULK_BUILD_CONF
+else
+       . `dirname $0`/build.conf
+fi
+
 if [ ! -z "$1" ]; then
        brokenfile=$1
 else
@@ -61,11 +68,15 @@
 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=x11/gnome
-#list='x11/xteddy x11/xsnow'
+if [ -n "${PKGLIST}" ]; then
+       list="${PKGLIST}"
+else
+       # List of all pkgs, from pkgsrc/*/Makefile
+       list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'`
+fi
+
+# cache the package list for printindex
+echo list='"'${list}'"' > .pkglist
 
 for pkgdir in $list
 do
diff -r 0687c4808a1e -r 9fa1fa4a6d97 mk/bulk/printindex
--- a/mk/bulk/printindex        Fri Jan 30 08:51:29 2004 +0000
+++ b/mk/bulk/printindex        Fri Jan 30 10:54:36 2004 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: printindex,v 1.13 2003/12/10 13:59:06 sketch Exp $
+# $NetBSD: printindex,v 1.14 2004/01/30 10:54:36 grant Exp $
 #
 #
 # Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -63,9 +63,12 @@
 SED=`${BMAKE} show-var VARNAME=SED`
 cd $cwd
 
-# List of all pkgs, from pkgsrc/*/Makefile
-list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'`
-
+if [ -r ${cwd}/.pkglist ]; then
+       . ${cwd}/.pkglist
+else
+       # fall back to all packages.
+       list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'`
+fi
 
 for pkgdir in $list
 do



Home | Main Index | Thread Index | Old Index