From 76479f1d3f6368b5bbc0e9c3a9b07e376cf4d8aa Mon Sep 17 00:00:00 2001 From: Will Andrews Date: Thu, 18 Sep 2014 14:41:57 +0000 Subject: [PATCH] Fix incremental builds involving non-root users with read-only source files. Makefiles should not assume that source files can be overwritten. This is the common case for Perforce source trees. This is a followup commit to r211243 in the same vein. MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: r1036319 on 2014/01/29, r1046711 on 2014/03/06 --- bin/csh/Makefile | 2 +- etc/mail/Makefile | 4 ++-- lib/libc/Makefile | 4 ++-- usr.bin/grep/Makefile | 2 +- usr.sbin/mtree/Makefile | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 9f305b4f5f04..fd345245eb0b 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -94,7 +94,7 @@ GENHDRS+= iconv.h SRCS+= iconv_stub.c iconv.h: ${.CURDIR}/iconv_stub.h - cp ${.CURDIR}/iconv_stub.h ${.TARGET} + cp -f ${.CURDIR}/iconv_stub.h ${.TARGET} .endif .endif diff --git a/etc/mail/Makefile b/etc/mail/Makefile index 3f085cc2d780..510b0243f984 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -69,7 +69,7 @@ SENDMAIL_MC!= hostname SENDMAIL_MC:= ${SENDMAIL_MC}.mc ${SENDMAIL_MC}: - cp freebsd.mc ${SENDMAIL_MC} + cp -f freebsd.mc ${SENDMAIL_MC} .endif .ifndef SENDMAIL_SUBMIT_MC @@ -77,7 +77,7 @@ SENDMAIL_SUBMIT_MC!= hostname SENDMAIL_SUBMIT_MC:= ${SENDMAIL_SUBMIT_MC}.submit.mc ${SENDMAIL_SUBMIT_MC}: - cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} + cp -f freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} .endif INSTALL_CF= ${SENDMAIL_MC:R}.cf diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 5a02e51b6ca4..ad3cc7415d7d 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -151,11 +151,11 @@ KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c mcount.c strcat.c strchr.c \ libkern: libkern.gen libkern.${LIBC_ARCH} libkern.gen: ${KQSRCS} ${KSRCS} - cp -p ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern + cp -fp ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern libkern.${LIBC_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) - cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} + cp -fp ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif .include diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index c0c24dc27c17..a4c614f2f499 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -11,7 +11,7 @@ PROG= bsdgrep CLEANFILES+= bsdgrep.1 bsdgrep.1: grep.1 - cp ${.ALLSRC} ${.TARGET} + cp -f ${.ALLSRC} ${.TARGET} .endif SRCS= file.c grep.c queue.c util.c diff --git a/usr.sbin/mtree/Makefile b/usr.sbin/mtree/Makefile index e73815aaac35..1ceb52eeb6f5 100644 --- a/usr.sbin/mtree/Makefile +++ b/usr.sbin/mtree/Makefile @@ -17,6 +17,6 @@ LDADD= -lmd CLEANFILES+= fmtree.8 fmtree.8: mtree.8 - cp ${.ALLSRC} ${.TARGET} + cp -f ${.ALLSRC} ${.TARGET} .include