diff options
author | will <will@FreeBSD.org> | 2015-01-16 21:39:08 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2015-01-16 21:39:08 +0000 |
commit | afad9375d853b7b34e4256d1c3421d937b565c57 (patch) | |
tree | 8a1af53c5feb7376262fc346729ffddd1a4b3c93 /share | |
parent | 96da0c1c63a35ba3aca3a9ef55e32fde9bdf7964 (diff) | |
download | FreeBSD-src-afad9375d853b7b34e4256d1c3421d937b565c57.zip FreeBSD-src-afad9375d853b7b34e4256d1c3421d937b565c57.tar.gz |
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
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/sys.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/share/mk/sys.mk b/share/mk/sys.mk index f691820..0fca510 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -67,6 +67,11 @@ CTFFLAGS ?= -L VERSION CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge + +# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle +# read-only files as non-root by passing -f. +CP ?= cp -f + DTRACE ?= dtrace .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g |