diff options
author | dmcmahill <dmcmahill> | 2003-01-05 13:37:15 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill> | 2003-01-05 13:37:15 +0000 |
commit | f7dc345cb9a0a97a68b18153622ae0668982c54b (patch) | |
tree | 16a15455a519acc4bd13fe42989df328675c70a2 /Makefile | |
parent | 2c9a404f480ab05a2879ed0b40c61d93928a0a74 (diff) | |
download | pkgsrc-f7dc345cb9a0a97a68b18153622ae0668982c54b.tar.gz |
Switch the top level pkgsrc 'readme' and 'cdrom-readme' targets to use the
new and much more efficient code. Previously a 'make readme' took over
3 weeks on my SS5 and now takes < 3 hours. The number of make calls has
been reduced from somewhere over 1,000,000 to one per package which is
around 3,000. The mk/scripts/mkreadme script does all the work now. This
script has been used in standalone form for a month or two on ftp.netbsd.org
and has had no problem.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.50 2002/12/15 02:49:37 salo Exp $ +# $NetBSD: Makefile,v 1.51 2003/01/05 13:37:15 dmcmahill Exp $ # .include "mk/bsd.prefs.mk" @@ -51,6 +51,40 @@ SUBDIR += x11 PKGSRCTOP= yes + +# If PACKAGES is set to the default (${_PKGSRCDIR}/packages), the current +# ${MACHINE_ARCH} and "release" (uname -r) will be used. Otherwise a directory +# structure of ...pkgsrc/packages/`uname -r`/${MACHINE_ARCH} is assumed. +# The PKG_URL is set from FTP_PKG_URL_* or CDROM_PKG_URL_*, depending on +# the target used to generate the README.html file. +.PHONY: README.html +_README_TYPE_FLAG?= none +README.html: .PRECIOUS +.if ${_README_TYPE_FLAG} == "--ftp" || ${_README_TYPE_FLAG} == "--cdrom" + @if [ -e ${PACKAGES} ]; then \ + cd ${PACKAGES}; \ + case `pwd` in \ + ${.CURDIR}/packages) \ + MULTIARCH=; \ + ;; \ + *) \ + MULTIARCH=--multi-arch; \ + ;; \ + esac; \ + cd ${.CURDIR} ; \ + fi; \ + ${ENV} TMPDIR=${TMPDIR:U/tmp}/mkreadme \ + BMAKE=${MAKE} AWK=${AWK} EXPR=${EXPR} \ + ./mk/scripts/mkreadme --pkgsrc ${.CURDIR} \ + --packages ${PACKAGES} ${_README_TYPE_FLAG} $$MULTIARCH \ + --prune +.else + @${ECHO} "ERROR: please do not use the README.html target directly." + @${ECHO} " Instead use either the \"readme\" or \"cdrom-readme\"" + @${ECHO} " target." + @${FALSE} +.endif + .include "mk/bsd.pkg.subdir.mk" # the bulk-cache and clean-bulk-cache targets are a global-pkgsrc |