summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2017-10-29 01:20:47 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2017-10-29 01:20:47 +0000
commit64ec67921de8e91ab879af120c388a8638561827 (patch)
treecc56958fe05108fc5188745acc86461e9233dc94 /Makefile.inc1
parent5e3b9061684e2b8eb6f8d3515f023fd679fc13b6 (diff)
downloadsrc-test2-64ec67921de8e91ab879af120c388a8638561827.tar.gz
src-test2-64ec67921de8e91ab879af120c388a8638561827.zip
Disallow using a colon ':' in source checkout paths.
This leaks into the PATH handling for WORLDTMP and breaks finding cross-tools. The PATH handling could be fixed to properly quote but is not worth the effort. Also allow this sanity check to always run even with 'make -n'. MFC after: 2 weeks Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=325069
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc110
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index f3c05a949084..54e6fefffe66 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -752,14 +752,20 @@ KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
# Attempt to rebuild the entire system, with reasonable chance of
# success, regardless of how old your existing system is.
#
-_sanity_check: .PHONY
+_sanity_check: .PHONY .MAKE
.if ${.CURDIR:C/[^,]//g} != ""
# The m4 build of sendmail files doesn't like it if ',' is used
# anywhere in the path of it's files.
@echo
@echo "*** Error: path to source tree contains a comma ','"
@echo
- false
+ @false
+.elif ${.CURDIR:M*\:*} != ""
+# Using ':' leaks into PATH and breaks finding cross-tools.
+ @echo
+ @echo "*** Error: path to source tree contains a colon ':'"
+ @echo
+ @false
.endif
_worldtmp: .PHONY