Add a ${CP} alias for copying files in the build.

Some users build FreeBSD as non-root in Perforce workspaces.  By default,
Perforce sets files read-only unless they're explicitly being edited.
As a result, the -f argument must be used to cp in order to override the
read-only flag when copying source files to object directories.  Bare use of
'cp' should be avoided in the future.

Update all current users of 'cp' in the src tree.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Spectra Logic
This commit is contained in:
Will Andrews
2015-01-16 21:39:08 +00:00
parent 5962fd53ac
commit 7a37b5fc17
18 changed files with 28 additions and 23 deletions
+2 -2
View File
@@ -111,10 +111,10 @@ ${GEN_KX509}: kx509.asn1
.SUFFIXES: .h .c .x .hx
.x.c:
cp -f ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.hx.h:
cp -f ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.include <bsd.lib.mk>
+2 -2
View File
@@ -45,10 +45,10 @@ ${GEN}: spnego.asn1 spnego.opt
.SUFFIXES: .h .c .x .hx
.x.c:
cp ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.hx.h:
cp ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.include <bsd.lib.mk>
+2 -2
View File
@@ -91,10 +91,10 @@ ${GEN}: hdb.asn1
.SUFFIXES: .h .c .x .hx
.x.c:
cp ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.hx.h:
cp ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.include <bsd.lib.mk>
+2 -2
View File
@@ -285,10 +285,10 @@ ${GEN_CRMF}: crmf.asn1
.SUFFIXES: .h .c .x .hx
.x.c:
cp ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.hx.h:
cp ${.IMPSRC} ${.TARGET}
${CP} ${.IMPSRC} ${.TARGET}
.include <bsd.lib.mk>