summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill@pkgsrc.org>2005-05-17 21:46:59 +0000
committerdmcmahill <dmcmahill@pkgsrc.org>2005-05-17 21:46:59 +0000
commit832614bc4c2036771efa6a90baac6b47a3204117 (patch)
tree0ab19d9d420b124621ec7a7e934636836fc90c76 /mk/bsd.pkg.mk
parent0f437f77f65b4db346ba56b33f1e86a6a00221c5 (diff)
downloadpkgsrc-832614bc4c2036771efa6a90baac6b47a3204117.tar.gz
Rework the README.html generation code. Major changes are:
- completely redo the code which decides on the machine architecture, operating system, and operating system version for the binary packages. The old way just used to directory names to take a guess. The new way creates a cache file containing meta-data for all the binary packages in each "All" directory. This cache file is consulted when generating the lists of available binary packages. The meta-data is obtained with pkg_info so it should always be correct even if you do something silly like mix OS_VERSION or MACHINE_ARCH packages up in the same directory. Among the benefits are: works when PACKAGES is not $PKGSRC/packages, works with a more or less arbitrary subdirectory structure, works when there are subdirectories for multiple operating systems. This portion of the fix should address PR25390. The cache files are only updated when the contents of an "All" directory changes or if the cache file format changes. There is some room for improving the updating of the cache files, but its not too bad the way it is. - fix up some of the awk code so that generadme.awk works with Solaris nawk as well as NetBSD's nawk and gawk (for pre-2.0 systems). - remove some "if ! foo" shell constructs to increase portability. - be more consistent with what variables get passed to mkreadme from make and which ones are determined automatically. Mostly this meant moving stuff into mkreadme to make it easier to run it standalone.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk14
1 files changed, 8 insertions, 6 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 50cb04be8ef..a11fdc8fd2e 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1667 2005/05/17 06:31:00 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1668 2005/05/17 21:46:59 dmcmahill Exp $
#
# This file is in the public domain.
#
@@ -3994,16 +3994,18 @@ README.html: .PRECIOUS
${AWK} -f ../../mk/scripts/genreadme.awk \
builddependsfile=/dev/null \
dependsfile=/dev/null \
+ AWK=${AWK} \
+ CMP=${CMP} \
DISTDIR=${DISTDIR} \
- MACHINE_ARCH=${MACHINE_ARCH} \
- MULTIARCH=$$MULTIARCH \
- OPSYS=${OPSYS} \
- OS_VERSION=${OS_VERSION} \
+ GREP=${GREP} \
PACKAGES=${PACKAGES} \
+ PKG_INFO="${PKG_INFO}" \
PKG_SUFX=${PKG_SUFX} \
PKG_URL=${PKG_URL} \
- PKGREPOSITORYSUBDIR=${PKGREPOSITORYSUBDIR} \
PKGSRCDIR=${.CURDIR:C|/[^/]*/[^/]*$||} \
+ SED=${SED} \
+ SETENV=${SETENV} \
+ SORT=${SORT} \
TMPDIR=${TMPDIR:U/tmp} \
SINGLEPKG=${PKGPATH} \
$@.tmp1