svn commit: r289040 - stable/10/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Thu Oct 8 17:45:05 UTC 2015


Author: bdrewery
Date: Thu Oct  8 17:45:03 2015
New Revision: 289040
URL: https://svnweb.freebsd.org/changeset/base/289040

Log:
  MFC r288179:
  
    Fix running make in src directories without a Makefile giving confusing
    errors.

Modified:
  stable/10/share/mk/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/mk/Makefile
==============================================================================
--- stable/10/share/mk/Makefile	Thu Oct  8 17:42:08 2015	(r289039)
+++ stable/10/share/mk/Makefile	Thu Oct  8 17:45:03 2015	(r289040)
@@ -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


More information about the svn-src-all mailing list