diff options
author | dmcmahill <dmcmahill> | 2003-03-20 00:03:16 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill> | 2003-03-20 00:03:16 +0000 |
commit | 702a582f0530b9348501e9cf92fea4b21005bc4b (patch) | |
tree | cbcfb4cc3dbafb1f2b59d0f639588a3a4175e1b4 /mk | |
parent | 3974206e45a9f9e4610680e6874c61a4c60850d5 (diff) | |
download | pkgsrc-702a582f0530b9348501e9cf92fea4b21005bc4b.tar.gz |
remove incorrect usage of README.html.BAK files. With this change,
1) an extra /usr/pkgsrc/README.html.BAK file is not created
2) we ensure that when a README.html file doesn't change, we don't
touch it. The prior version of this file caused the timestamp to
change.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.subdir.mk | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mk/bsd.pkg.subdir.mk b/mk/bsd.pkg.subdir.mk index fcc09d29c95..ced3e7a0504 100644 --- a/mk/bsd.pkg.subdir.mk +++ b/mk/bsd.pkg.subdir.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.subdir.mk,v 1.51 2003/01/15 20:55:39 jlam Exp $ +# $NetBSD: bsd.pkg.subdir.mk,v 1.52 2003/03/20 00:03:16 dmcmahill Exp $ # Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 # @@ -113,13 +113,11 @@ readmes: readme _SUBDIRUSE .if !target(readme) readme: - @if [ -f README.html ]; then ${MV} -f README.html README.html.BAK ; fi @${MAKE} ${MAKEFLAGS} README.html _README_TYPE_FLAG=--ftp _README_TYPE=$@ .endif .if !target(cdrom-readme) cdrom-readme: - @if [ -f README.html ]; then ${MV} -f README.html README.html.BAK ; fi @${MAKE} ${MAKEFLAGS} README.html _README_TYPE_FLAG=--cdrom README_TYPE=$@ .endif @@ -132,6 +130,7 @@ README= ../templates/README.category HTMLIFY= ${SED} -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' .if !target(README.html) +.PHONY: README.html README.html: .PRECIOUS @> $@.tmp .for entry in ${SUBDIR} @@ -158,13 +157,12 @@ README.html: .PRECIOUS -e '/%%SUBDIR%%/r$@.tmp2' \ -e '/%%SUBDIR%%/d' \ > $@.tmp5 - @if cmp -s $@.tmp5 $@.BAK ; then \ - ${MV} $@.BAK $@ ; \ + @if [ ! -f $@ ]; then ${TOUCH} $@ ; fi + @if ${CMP} -s $@.tmp5 $@ ; then \ ${RM} $@.tmp5 ; \ else \ ${ECHO_MSG} "===> Creating README.html for ${_THISDIR_}${.CURDIR:T}" ; \ ${MV} $@.tmp5 $@ ; \ - ${RM} -f $@.BAK ; \ fi @${RM} -f $@.tmp $@.tmp2 $@.tmp3 $@.tmp4 .for subdir in ${SUBDIR} |