aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2014-04-29 16:57:25 +0000
committerBrooks Davis <brooks@FreeBSD.org>2014-04-29 16:57:25 +0000
commit4b55d3602fb9df5f50073ea9c363357f79490855 (patch)
tree0d3da4675860cf93da0a6d7bc372d453daf6d4a5 /Makefile
parent68bbdd0e710e0295d358e77fcf106d9344285cf2 (diff)
downloadsrc-4b55d3602fb9df5f50073ea9c363357f79490855.tar.gz
src-4b55d3602fb9df5f50073ea9c363357f79490855.zip
Merge from CheriBSD:
commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Fri Mar 28 16:24:45 2014 +0000 Add a long needed seatbelt. Exit with an error when make is called without a target at the top level rather than poluting the source tree and causing use confusion in future builds. commit a9d9aa341b2f4308a227ab460ba85f1f287ad028 Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Tue Apr 29 16:06:12 2014 +0000 Simplify seatbelt added in 1d1b908 based in feedback. Discussed with: imp@FreeBSD.org Reviewed by: imp Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=265097
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cc1ca6d2068f..7dafc36ebcbf 100644
--- a/Makefile
+++ b/Makefile
@@ -238,8 +238,17 @@ tinderbox toolchains kernel-toolchains: .MAKE
${TGTS}:
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
-# Set a reasonable default
-.MAIN: all
+# The historic default "all" target creates files which may cause stale
+# or (in the cross build case) unlinkable results. Fail with an error
+# when no target is given. The users can explicitly specify "all"
+# if they want the historic behavior.
+.MAIN: _guard
+
+_guard:
+ @echo
+ @echo "Explicit target required (use \"all\" for historic behavior)"
+ @echo
+ @false
STARTTIME!= LC_ALL=C date
CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo