From owner-svn-src-head@freebsd.org Sat Nov 4 21:02:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28505E55B1A; Sat, 4 Nov 2017 21:02:28 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E680A8230C; Sat, 4 Nov 2017 21:02:27 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA4L2Rn5063979; Sat, 4 Nov 2017 21:02:27 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA4L2RuR063978; Sat, 4 Nov 2017 21:02:27 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201711042102.vA4L2RuR063978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 4 Nov 2017 21:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325404 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2017 21:02:28 -0000 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