diff options
author | asami <asami@FreeBSD.org> | 2000-10-14 19:03:19 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 2000-10-14 19:03:19 +0800 |
commit | 34e82d07e44a5ef20fbfa3ecad75a51586d74d79 (patch) | |
tree | a8c0f7a21c68d69815399ff2056bf7d43e5e12b0 | |
parent | 93997107760abbda87f4f1cd2b008f1786560292 (diff) | |
download | freebsd-ports-gnome-34e82d07e44a5ef20fbfa3ecad75a51586d74d79.tar.gz freebsd-ports-gnome-34e82d07e44a5ef20fbfa3ecad75a51586d74d79.tar.zst freebsd-ports-gnome-34e82d07e44a5ef20fbfa3ecad75a51586d74d79.zip |
Fix COMMENT handling -- it was incorrectly using the fixed string
"pkg/COMMENT' which of course blew up in the entire tree when we
changed the layout.
Fix it to use `make -V COMMENT` so it will use even for ports that
define MASTERDIR etc.
Reported by PRs: 21851, 21952
While I'm here, add the contents of pkg/COMMENT in category READMEs.
I don't know why I didn't include them in the first place when I've
been creating all those files!
-rw-r--r-- | Mk/bsd.port.subdir.mk | 21 | ||||
-rw-r--r-- | Templates/README.category | 6 |
2 files changed, 19 insertions, 8 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk index caed067281bd..40e1f2882c6c 100644 --- a/Mk/bsd.port.subdir.mk +++ b/Mk/bsd.port.subdir.mk @@ -195,6 +195,8 @@ README= ${TEMPLATES}/README.top .else README= ${TEMPLATES}/README.category .endif +COMMENT?= ${.CURDIR}/pkg/COMMENT +DESCR?= ${.CURDIR}/pkg/DESCR HTMLIFY= sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' @@ -210,26 +212,29 @@ README.html: .else @echo -n '<a href="'${entry}/README.html'">'"`cd ${entry}; make package-name | ${HTMLIFY}`</a>: " >> $@.tmp .endif -.if exists(${entry}/pkg/COMMENT) - @${HTMLIFY} ${entry}/pkg/COMMENT >> $@.tmp -.else - @echo "(no description)" >> $@.tmp -.endif + @cat `cd ${entry}; make -V COMMENT` | ${HTMLIFY} >> $@.tmp .endfor @sort -t '>' +1 -2 $@.tmp > $@.tmp2 -.if exists(${.CURDIR}/pkg/DESCR) - @${HTMLIFY} ${.CURDIR}/pkg/DESCR > $@.tmp3 +.if exists(${DESCR}) + @${HTMLIFY} ${DESCR} > $@.tmp3 .else @> $@.tmp3 .endif +.if exists(${COMMENT}) + @${HTMLIFY} ${COMMENT} > $@.tmp4 +.else + @> $@.tmp4 +.endif @cat ${README} | \ sed -e 's/%%CATEGORY%%/'"`basename ${.CURDIR}`"'/g' \ + -e '/%%COMMENT%%/r$@.tmp4' \ + -e '/%%COMMENT%%/d' \ -e '/%%DESCR%%/r$@.tmp3' \ -e '/%%DESCR%%/d' \ -e '/%%SUBDIR%%/r$@.tmp2' \ -e '/%%SUBDIR%%/d' \ > $@ - @rm -f $@.tmp $@.tmp2 $@.tmp3 + @rm -f $@.tmp $@.tmp2 $@.tmp3 $@.tmp4 .if !defined(NOPRECIOUSMAKEVARS) .MAKEFLAGS: \ diff --git a/Templates/README.category b/Templates/README.category index 1202f0f78bbd..15ff74596172 100644 --- a/Templates/README.category +++ b/Templates/README.category @@ -5,6 +5,12 @@ <p>You are now in the directory "%%CATEGORY%%". +<p>This is the one-line description for this category: + +<p><hr><p> +%%COMMENT%% +<p><hr> + <p> %%DESCR%% |