Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 2009 20:25:56 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191794 - head/sys/conf
Message-ID:  <200905042025.n44KPuHj056072@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon May  4 20:25:56 2009
New Revision: 191794
URL: http://svn.freebsd.org/changeset/base/191794

Log:
  Always compute the root of the kernel source tree and explicitly pass it
  to module builds.  This avoids having to have the module builds walk up
  the tree to find the kernel sources.  It also allows a kernel + module
  build to succeed when a new level of module subdirectories is added without
  requiring that the /usr/share/mk/bsd.kmod.mk file on the machine be patched.
  
  MFC after:	1 week

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk	Mon May  4 19:19:13 2009	(r191793)
+++ head/sys/conf/kern.post.mk	Mon May  4 20:25:56 2009	(r191794)
@@ -12,7 +12,8 @@
 .if defined(DESTDIR)
 MKMODULESENV+=	DESTDIR="${DESTDIR}"
 .endif
-MKMODULESENV+=	KERNBUILDDIR="${.CURDIR}"
+SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
+MKMODULESENV+=	KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}"
 
 .MAIN: all
 
@@ -29,7 +30,6 @@ modules-${target}:
 
 # Handle out of tree ports 
 .if !defined(NO_MODULES) && defined(PORTS_MODULES)
-SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
 PORTSMODULESENV=SYSDIR=${SYSDIR}
 .for __target in all install reinstall clean
 ${__target}: ports-${__target}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905042025.n44KPuHj056072>