From 394a144c005690c0352c114780339ce45e865072 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Thu, 29 Oct 2015 00:41:03 +0000 Subject: [PATCH] Fix regression from using .USEBEFORE in _SUBDIR in r289705. Using .USEBEFORE had the unintended side-effect of changing the directory for the real target ran in the current directory. For example this meant that the 'make clean' would run in one of the SUBDIR. Sponsored by: EMC / Isilon Storage Division Pointyhat to: bdrewery --- share/mk/bsd.subdir.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 0a22fbec74a5..f9b9e979c2a6 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -83,7 +83,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) @${_+_}target=${.TARGET:S,realinstall,install,}; \ - for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done + for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif ${SUBDIR:N.WAIT}: .PHONY .MAKE -- 2.39.5