From owner-svn-src-stable@FreeBSD.ORG Thu May 1 03:16:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 418C127D; Thu, 1 May 2014 03:16:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E7A418A7; Thu, 1 May 2014 03:16:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s413GePG006818; Thu, 1 May 2014 03:16:40 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s413GeoI006817; Thu, 1 May 2014 03:16:40 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201405010316.s413GeoI006817@svn.freebsd.org> From: Mark Johnston Date: Thu, 1 May 2014 03:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265168 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 03:16:41 -0000 Author: markj Date: Thu May 1 03:16:40 2014 New Revision: 265168 URL: http://svnweb.freebsd.org/changeset/base/265168 Log: MFC r262733: Use a full path to the target for make rules which create symlinks @, machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named "x86" or "x86.c" in the make path can cause problems. Modified: stable/9/sys/conf/kmod.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kmod.mk ============================================================================== --- stable/9/sys/conf/kmod.mk Thu May 1 01:42:48 2014 (r265167) +++ stable/9/sys/conf/kmod.mk Thu May 1 03:16:40 2014 (r265168) @@ -243,7 +243,7 @@ beforedepend: ${_ILINKS} # causes all the modules to be rebuilt when the directory pointed to changes. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${OBJS}: ${_link} +${OBJS}: ${.OBJDIR}/${_link} .endif .endfor @@ -257,18 +257,23 @@ SYSDIR= ${_dir} .error "can't find kernel source tree" .endif -${_ILINKS}: - @case ${.TARGET} in \ +.for _link in ${_ILINKS} +.PHONY: ${_link} +${_link}: ${.OBJDIR}/${_link} + +${.OBJDIR}/${_link}: + @case ${.TARGET:T} in \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ path=${SYSDIR} ;; \ *) \ - path=${SYSDIR}/${.TARGET}/include ;; \ + path=${SYSDIR}/${.TARGET:T}/include ;; \ esac ; \ path=`(cd $$path && /bin/pwd)` ; \ - ${ECHO} ${.TARGET} "->" $$path ; \ - ln -sf $$path ${.TARGET} + ${ECHO} ${.TARGET:T} "->" $$path ; \ + ln -sf $$path ${.TARGET:T} +.endfor CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS}