Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2014 03:18:11 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r265169 - stable/10/sys/conf
Message-ID:  <201405010318.s413IBlE007222@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu May  1 03:18:11 2014
New Revision: 265169
URL: http://svnweb.freebsd.org/changeset/base/265169

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/10/sys/conf/kmod.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/kmod.mk
==============================================================================
--- stable/10/sys/conf/kmod.mk	Thu May  1 03:16:40 2014	(r265168)
+++ stable/10/sys/conf/kmod.mk	Thu May  1 03:18:11 2014	(r265169)
@@ -238,7 +238,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
 
@@ -252,18 +252,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}
 



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