svn commit: r326582 - head/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Tue Dec 5 21:30:23 UTC 2017


Author: bdrewery
Date: Tue Dec  5 21:30:22 2017
New Revision: 326582
URL: https://svnweb.freebsd.org/changeset/base/326582

Log:
  Deal with bmake-20170301 no longer resolving -C like it used to.
  
  Several checks assume .CURDIR is resolved, such as for determining RELDIR from
  SRCTOP/.CURDIR.  If -C is used then the path is no longer resolved like it was
  before which is problematic for symlinked source trees.  A similar change was
  also made to ports post bmake-20170301.
  
  This fixes 'make -C <symlinked path> buildworld' using the wrong OBJDIR.
  
  Reported by:	rstone
  Sponsored by:	Dell EMC

Modified:
  head/share/mk/src.sys.env.mk

Modified: head/share/mk/src.sys.env.mk
==============================================================================
--- head/share/mk/src.sys.env.mk	Tue Dec  5 21:30:17 2017	(r326581)
+++ head/share/mk/src.sys.env.mk	Tue Dec  5 21:30:22 2017	(r326582)
@@ -2,6 +2,14 @@
 
 # early setup only see also src.sys.mk
 
+# bmake-20170301 started taking '-C' "as is" for some cases, notably absolute
+# paths.  Some later comparisons will assume .CURDIR is resolved and matches
+# what we would get with 'cd'.  So just force resolve it now if it is an
+# absolute path.
+.if ${MAKE_VERSION} >= 20170301 && !empty(.CURDIR:M/*)
+.CURDIR:= ${.CURDIR:tA}
+.endif
+
 # make sure this is defined in a consistent manner
 SRCTOP:= ${.PARSEDIR:tA:H:H}
 


More information about the svn-src-head mailing list