path: root/release/Makefile
diff options
authorGlen Barber <gjb@FreeBSD.org>2016-01-06 05:23:25 +0000
committerGlen Barber <gjb@FreeBSD.org>2016-01-06 05:23:25 +0000
commitfdbd473ce57080845c13750e72bb82fa0ca32e33 (patch)
tree2b7f61e67bc4787e32d032a96ec62a222a8362fc /release/Makefile
parenta85f12322cd3cf3d794dc78ecbfa09728f23948b (diff)
Add a new target to touch the ${.OBJDIR}/release file, which
indicates the 'release' target has run (in order to prevent subsequent invocations that may clobber original build output). As is, the 'release' target is a dummy target that does nothing more than depend on subsequent targets. Unless 'make obj' is invoked prior to 'make release', .OBJDIR and .CURDIR will always be '/usr/src/release' (or wherever /usr/src is located). When 'make release' invokes 'make real-release' (and subsequent targets), .OBJDIR is not updated, which still leads to src/ tree pollution. While arguably a hack, 'make release' will invoke the original dummy targets as originally intended, but instead of touching an empty file (or returing @true), will call a 'release-done' target that will trigger the behavior that was intended to prevent a subsequent invocation. Discussed with: hrs MFC after: 3 days X-MFC-With: r293173 Sponsored by: The FreeBSD Foundation
Notes: svn path=/head/; revision=293231
Diffstat (limited to 'release/Makefile')
1 files changed, 5 insertions, 1 deletions
diff --git a/release/Makefile b/release/Makefile
index 07b8048de483..ba1ca80c050c 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -281,7 +281,11 @@ ftp: packagesystem
cp *.txz MANIFEST ftp
release: real-release vm-release cloudware-release
- touch ${.OBJDIR}/${.TARGET}
+ ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done
+ true
+ touch release