Module Name:    src
Committed By:   gdt
Date:           Wed Jul 31 11:57:24 UTC 2013

Modified Files:
        src/share/man/man7: Makefile

Log Message:
Remove tests.7 in objdir before copying to it.

If one's source tree has non-writable files (because of CVSREAD=t, or
someone else owns it, or it's on some read-only filesystems, some
other reason), recently-added makefile code would cp tests.foo.7 in
the sources to tests.7 in objdir, preserving permissions, but not
forcing the copy.  A subsequent copy would result in an error, failing
the build.  Therefore, rm -f the target file before doing the copy.

(Arguably there should some standard support for this, but copying
files from the source directory to objdir is quite unusual.)


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man7/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man7/Makefile
diff -u src/share/man/man7/Makefile:1.29 src/share/man/man7/Makefile:1.30
--- src/share/man/man7/Makefile:1.29	Mon Feb 25 02:02:41 2013
+++ src/share/man/man7/Makefile	Wed Jul 31 11:57:24 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2013/02/25 02:02:41 jmmv Exp $
+#	$NetBSD: Makefile,v 1.30 2013/07/31 11:57:24 gdt Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 .include <bsd.init.mk>
@@ -13,10 +13,10 @@ MAN=	ascii.7 c.7 environ.7 glob.7 hier.7
 CLEANFILES=	tests.7
 .if ${MKKYUA} != "no"
 tests.7: tests.kyua.7
-	cp ${.ALLSRC} ${.TARGET}
+	rm -f ${.TARGET} && cp ${.ALLSRC} ${.TARGET}
 .else
 tests.7: tests.atf.7
-	cp ${.ALLSRC} ${.TARGET}
+	rm -f ${.TARGET} && cp ${.ALLSRC} ${.TARGET}
 .endif
 
 MLINKS+=c.7 c78.7 \

Reply via email to