summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-08 17:45:03 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-08 17:45:03 +0000
commite87917047a10732b07dab87440604b1e2578a8bb (patch)
treee44e1bee64c0b681e8dc2cb8c143bbc816ce6cf9
parent7b86f845febc3b375bb02008a456a5514a9396c9 (diff)
downloadFreeBSD-src-e87917047a10732b07dab87440604b1e2578a8bb.zip
FreeBSD-src-e87917047a10732b07dab87440604b1e2578a8bb.tar.gz
MFC r288179:
Fix running make in src directories without a Makefile giving confusing errors.
-rw-r--r--share/mk/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/mk/Makefile b/share/mk/Makefile
index d0234d8..5c495b1 100644
--- a/share/mk/Makefile
+++ b/share/mk/Makefile
@@ -1,6 +1,12 @@
# $FreeBSD$
# @(#)Makefile 8.1 (Berkeley) 6/8/93
+# Only parse this if executing make in this directory, not in other places
+# in src that lack a Makefile, such as sys/dev/*. Otherwise the MAKESYSPATH
+# will read this Makefile since it auto includes it into -I.
+# Note that this guard only works for bmake.
+.if !defined(.PARSEDIR) || ${.CURDIR} == ${.PARSEDIR}
+
.include <bsd.own.mk>
FILES= \
@@ -51,3 +57,4 @@ FILES+= tap.test.mk
.endif
.include <bsd.prog.mk>
+.endif # CURDIR == PARSEDIR
OpenPOWER on IntegriCloud