diff options
author | agc <agc> | 1997-11-21 17:44:11 +0000 |
---|---|---|
committer | agc <agc> | 1997-11-21 17:44:11 +0000 |
commit | 9a0742eb1600b0f86dfe7dd85fec9c696267f409 (patch) | |
tree | 0c08b6b47c93c845a53a9e80cf979c44e59bb13f /mk/bsd.port.mk | |
parent | 9347baa231e174fed372ad71824d5a6e364d265e (diff) | |
download | pkgsrc-9a0742eb1600b0f86dfe7dd85fec9c696267f409.tar.gz |
Remove the magic control characters in a similar way to Bill Fenner's
patch for bsd.port.subdir.mk.
Diffstat (limited to 'mk/bsd.port.mk')
-rw-r--r-- | mk/bsd.port.mk | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/mk/bsd.port.mk b/mk/bsd.port.mk index f5b809fba0a..4fdcd0476e9 100644 --- a/mk/bsd.port.mk +++ b/mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.port.mk,v 1.18 1997/11/19 16:41:21 agc Exp $ +# $NetBSD: bsd.port.mk,v 1.19 1997/11/21 17:44:11 agc Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -1731,16 +1731,31 @@ readme: @cd ${.CURDIR} && make README.html .endif +HTMLIFY= ${SED} -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' + +.if (${OPSYS} == "NetBSD") +README_NAME= ${TEMPLATES}/README.pkg +.else +README_NAME= ${TEMPLATES}/README.port +.endif + README.html: @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" - @${CAT} ${TEMPLATES}/README.port | \ - ${SED} -e 's%%PORT%%'`${ECHO} ${.CURDIR} | ${SED} -e 's.*/\([^/]*/[^/]*\)$$\1'`'g' \ - -e 's%%PKG%%${PKGNAME}g' \ + @${MAKE} print-depends-list | ${HTMLIFY} >> $@.tmp1 + @${MAKE} print-package-depends | ${HTMLIFY} >> $@.tmp2 + @${ECHO} ${PKGNAME} | ${HTMLIFY} >> $@.tmp3 + @${CAT} ${README_NAME} | \ + ${SED} -e 's/%%PORT%%/'"`basename ${.CURDIR}`"'/g' \ + -e '/%%PKG%%/r$@.tmp3' \ + -e '/%%PKG%%/d' \ -e '/%%COMMENT%%/r${PKGDIR}/COMMENT' \ -e '/%%COMMENT%%/d' \ - -e 's%%BUILD_DEPENDS%%'"`${MAKE} print-depends-list`"'' \ - -e 's%%RUN_DEPENDS%%'"`${MAKE} print-package-depends`"'' \ + -e '/%%BUILD_DEPENDS%%/r$@.tmp1' \ + -e '/%%BUILD_DEPENDS%%/d' \ + -e '/%%RUN_DEPENDS%%/r$@.tmp2' \ + -e '/%%RUN_DEPENDS%%/d' \ >> $@ + @rm -f $@.tmp1 $@.tmp2 $@.tmp3 .if !target(print-depends-list) print-depends-list: |