Date: Sat, 4 Nov 2017 21:02:27 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325404 - head/share/mk Message-ID: <201711042102.vA4L2RuR063978@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Sat Nov 4 21:02:26 2017 New Revision: 325404 URL: https://svnweb.freebsd.org/changeset/base/325404 Log: Ensure .OBJDIR has known value If for any reason we cannot set .OBJDIR==_objdir as desired use .CURDIR so that at least the classic .if ${.OBJDIR} != ${.CURDIR} works and dangerous misstakes can be avoided. Reviewed by: bdrewery Modified: head/share/mk/auto.obj.mk Modified: head/share/mk/auto.obj.mk ============================================================================== --- head/share/mk/auto.obj.mk Sat Nov 4 16:23:34 2017 (r325403) +++ head/share/mk/auto.obj.mk Sat Nov 4 21:02:26 2017 (r325404) @@ -61,11 +61,17 @@ __objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMA .endif # This causes make to use the specified directory as .OBJDIR .OBJDIR: ${__objdir} -.if ${.OBJDIR:tA} != ${__objdir:tA} && ${__objdir_made:Uno:M${__objdir}/*} != "" +.if ${.OBJDIR:tA} != ${__objdir:tA} +# we did not get what we want - do we care? +.if ${__objdir_made:Uno:M${__objdir}/*} != "" # watch out for __objdir being relative path .if !(${__objdir:M/*} == "" && ${.OBJDIR:tA} == ${${.CURDIR}/${__objdir}:L:tA}) .error could not use ${__objdir}: .OBJDIR=${.OBJDIR} .endif +.endif +# apparently we can live with it +# make sure we know what we have +.OBJDIR: ${.CURDIR} .endif .endif .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711042102.vA4L2RuR063978>