diff options
author | hubertf <hubertf@pkgsrc.org> | 1998-06-29 21:52:20 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1998-06-29 21:52:20 +0000 |
commit | 8c743a0b7da52f40056efa5af2c363f1113ddbd4 (patch) | |
tree | 9da2efdc991da17c5d9c0de2b87f0bd260eebcb3 /mk | |
parent | e38fbdb47783317e5e497cf62b0d1a255846db1d (diff) | |
download | pkgsrc-8c743a0b7da52f40056efa5af2c363f1113ddbd4.tar.gz |
Attempt to re-renerate README.html only if it has really changed.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index a09bfaef6bf..8bede9c2fcd 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.105 1998/06/23 10:35:56 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.106 1998/06/29 21:52:20 hubertf Exp $ # # This file is in the public domain. # @@ -1634,7 +1634,7 @@ readmes: readme .if !target(readme) readme: - @rm -f README.html + @if [ -f README.html ]; then mv -f README.html README.html.BAK ; fi @cd ${.CURDIR} && ${MAKE} README.html .endif @@ -1671,7 +1671,14 @@ README.html: -e 's@%%BIN_POSTREL%%@</A>@g' \ -e 's@%%BIN_PREARCH%%@<LI> @g' \ -e 's@%%BIN_POSTARCH%%@@g' \ - >> $@ + >> $@.tmp + @if cmp -s $@.tmp $@.BAK ; then \ + mv $@.BAK $@ ; \ + rm $@.tmp ; \ + else \ + mv $@.tmp $@ ; \ + rm -f $@.BAK ; \ + fi @rm -f $@.tmp1 $@.tmp2 $@.tmp3 $@.tmp4 .if !target(print-depends-list) |