From c3d7eb1d7bfb13a83afd6b3bae2c3968001fa06b Mon Sep 17 00:00:00 2001 From: bdrewery Date: Mon, 19 Jun 2017 18:08:02 +0000 Subject: [PATCH] Follow-up r320061: Need to respect make.conf/env LIBDIR overrides. This fixes the lib32 build from creating all stale .depend files. X-MFC-With: 320061 MFC after: 1 week Sponsored by: Dell EMC Isilon --- share/mk/bsd.own.mk | 5 +++++ share/mk/local.sys.mk | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index ac3ec93f593f..fd4ba874c596 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -152,6 +152,11 @@ DTBOWN?= root DTBGRP?= wheel DTBMODE?= 444 +# Use make.conf / environment LIBDIR as default if set... +.if !empty(_PREMK_LIBDIR) +LIBDIR_BASE?= ${_PREMK_LIBDIR} +.endif +# otherwise use our expected default value. LIBDIR_BASE?= /usr/lib LIBDIR?= ${LIBDIR_BASE} LIBCOMPATDIR?= /usr/lib/compat diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 0fb9b1acaaaf..e3bfd572f411 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -42,6 +42,10 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} .endif +.if !empty(LIBDIR) +_PREMK_LIBDIR:= ${LIBDIR} +.endif + .include "src.sys.mk" .if ${.MAKE.MODE:Mmeta*} != ""