From e87917047a10732b07dab87440604b1e2578a8bb Mon Sep 17 00:00:00 2001 From: bdrewery Date: Thu, 8 Oct 2015 17:45:03 +0000 Subject: MFC r288179: Fix running make in src directories without a Makefile giving confusing errors. --- share/mk/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) 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 FILES= \ @@ -51,3 +57,4 @@ FILES+= tap.test.mk .endif .include +.endif # CURDIR == PARSEDIR -- cgit v1.1