diff --git a/share/mk/Makefile b/share/mk/Makefile index d8aea5c5547..eaa8e0f8286 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,6 +1,11 @@ # $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. +.if ${.CURDIR} == ${.PARSEDIR} + .include FILES= \ @@ -63,3 +68,4 @@ FILES+= tap.test.mk .endif .include +.endif # CURDIR == PARSEDIR