Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/vndcompress Use write-to-temporary/rename-to-permane...



details:   https://anonhg.NetBSD.org/src/rev/e2d38b786c61
branches:  trunk
changeset: 792934:e2d38b786c61
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jan 22 06:14:55 2014 +0000

description:
Use write-to-temporary/rename-to-permanent pattern in Makefile.

diffstat:

 usr.bin/vndcompress/Makefile |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 4bad7d9fd322 -r e2d38b786c61 usr.bin/vndcompress/Makefile
--- a/usr.bin/vndcompress/Makefile      Wed Jan 22 06:14:46 2014 +0000
+++ b/usr.bin/vndcompress/Makefile      Wed Jan 22 06:14:55 2014 +0000
@@ -145,13 +145,17 @@
 .SUFFIXES: .cl2 .cl2x .in .out .outx
 
 .in.cl2: vndcompress
-       ./vndcompress ${.IMPSRC} ${.TARGET} ${BLOCKSIZE.${.PREFIX}}
+       ./vndcompress ${.IMPSRC} ${.TARGET}.tmp ${BLOCKSIZE.${.PREFIX}} \
+       && mv -f ${.TARGET}.tmp ${.TARGET}
 
 .in.cl2x:
-       vndcompress ${.IMPSRC} ${.TARGET} ${BLOCKSIZE.${.PREFIX}}
+       vndcompress ${.IMPSRC} ${.TARGET}.tmp ${BLOCKSIZE.${.PREFIX}} \
+       && mv -f ${.TARGET}.tmp ${.TARGET}
 
 .cl2.out: vndcompress
-       ./vndcompress -d ${.IMPSRC} ${.TARGET}
+       ./vndcompress -d ${.IMPSRC} ${.TARGET}.tmp \
+       && mv -f ${.TARGET}.tmp ${.TARGET}
 
 .cl2.outx:
-       vnduncompress ${.IMPSRC} ${.TARGET}
+       vnduncompress ${.IMPSRC} ${.TARGET}.tmp \
+       && mv -f ${.TARGET}.tmp ${.TARGET}



Home | Main Index | Thread Index | Old Index