diff options
author | hubertf <hubertf> | 1998-06-29 21:52:20 +0000 |
---|---|---|
committer | hubertf <hubertf> | 1998-06-29 21:52:20 +0000 |
commit | 158a929c82336be07c377699977debe0423ea4cb (patch) | |
tree | 9da2efdc991da17c5d9c0de2b87f0bd260eebcb3 /mk | |
parent | 6bbc7f3e73dbfd4b645671a715254d294b9e72be (diff) | |
download | pkgsrc-158a929c82336be07c377699977debe0423ea4cb.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) |