From 6251c65a82b50212fc46ba91b6ab0613b7751ba5 Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Mon, 8 Jun 2015 23:34:04 +0000 Subject: Latest dirdeps.mk sets DEP_RELDIR for itself. This helps guard against bugs in manually edited Makefile.depend files, and avoids the need to call realpath from the Makefile.depend file. --- share/mk/dirdeps.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'share/mk/dirdeps.mk') diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index d46bced3f89d..4aa101fbd8d0 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.53 2015/05/24 07:08:24 sjg Exp $ +# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -588,6 +588,11 @@ _qm := ${_m:C;(\.depend)$;\1.${d:E};:${M_dep_qual_fixes:ts:}} _DEP_TARGET_SPEC := ${d:E} # some makefiles may still look at this _DEP_MACHINE := ${d:E:C/,.*//} +# set this "just in case" +# we can skip :tA since we computed the path above +DEP_RELDIR := ${_m:H:S,${SRCTOP}/,,} +# and reset this +DIRDEPS = .if ${_debug_reldir} && ${_qm} != ${_m} .info loading ${_m} for ${d:E} .endif @@ -603,7 +608,9 @@ _DEP_MACHINE := ${d:E:C/,.*//} .elif ${.MAKE.LEVEL} > 42 .error You should have stopped recursing by now. .else -_DEP_RELDIR := ${DEP_RELDIR} +# we are building something +DEP_RELDIR := ${RELDIR} +_DEP_RELDIR := ${RELDIR} # pickup local dependencies .-include <.depend> .endif -- cgit v1.2.3