From dc3aa46cc2cafda06c36af06303ac7763fe77ed2 Mon Sep 17 00:00:00 2001 From: hubertf Date: Sun, 22 Aug 1999 01:30:15 +0000 Subject: Collect information from pkgsrc/*/README.html into one long list (README-all.html), and reference this file. --- Makefile | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d3b562f6df0..6b48f7d792a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 1999/06/06 19:33:17 frueauf Exp $ +# $NetBSD: Makefile,v 1.25 1999/08/22 01:30:15 hubertf Exp $ # FreeBSD Id: Makefile,v 1.35 1997/08/19 07:10:01 fenner Exp # @@ -78,3 +78,40 @@ search: ${.CURDIR}/INDEX @grep ${key} ${.CURDIR}/INDEX | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArch:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }' .endif + +# +# Generate list of all packages by extracting information from +# the category/README.html pages +# +readme-all: + @mv README-all.html README-all.html.BAK + @${MAKE} README-all.html + @if cmp -s README-all.html README-all.html.BAK ; then \ + mv README-all.html.BAK README-all.html ; \ + else \ + rm -f README-all.html.BAK ; \ + fi + +README-all.html: + @rm -f $@.new + @rm -f $@.newsorted + @echo -n "Processing categories for $@:" +.for category in ${SUBDIR} + @if [ -f ${category}/README.html ]; then \ + echo -n ' ${category}' ; \ + grep '^' ${category}/README.html \ + | sed -e 's|"|"${category}/|' \ + -e 's| | (${category}) |' \ + -e 's|||' \ + >> $@.new ; \ + fi +.endfor + @echo "." + @sort -t '">' +2 <$@.new >$@.newsorted + @cat templates/README.all \ + | ${SED} \ + -e '/%%PKGS%%/r$@.newsorted' \ + -e '/%%PKGS%%/d' \ + > $@ + @rm -f $@.new + @rm -f $@.newsorted -- cgit v1.2.3