summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2005-05-17 21:46:59 +0000
committerdmcmahill <dmcmahill>2005-05-17 21:46:59 +0000
commit056c929b8debfddf632c149f12ae65e419ebe09a (patch)
tree0ab19d9d420b124621ec7a7e934636836fc90c76 /Makefile
parent25fb1bd6c84ba056c3fb88ff31d0df8cca95348f (diff)
downloadpkgsrc-056c929b8debfddf632c149f12ae65e419ebe09a.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 'Makefile')
-rw-r--r--Makefile18
1 files changed, 3 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index e15e20f4a68..b0f20f83458 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.70 2005/05/16 19:59:54 wiz Exp $
+# $NetBSD: Makefile,v 1.71 2005/05/17 21:46:59 dmcmahill Exp $
#
# tools used by this Makefile
@@ -78,22 +78,10 @@ PKGSRCTOP= yes
_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; \
${SETENV} TMPDIR=${TMPDIR:U/tmp}/mkreadme \
- BMAKE=${MAKE} AWK=${AWK} EXPR=${EXPR} \
+ BMAKE=${MAKE} \
./mk/scripts/mkreadme --pkgsrc ${.CURDIR} \
- --packages ${PACKAGES} ${_README_TYPE_FLAG} $$MULTIARCH \
+ --packages ${PACKAGES} ${_README_TYPE_FLAG} \
--prune
.else
@${ECHO} "ERROR: please do not use the README.html target directly."