diff options
Diffstat (limited to 'mk/meta.stage.mk')
| -rw-r--r-- | mk/meta.stage.mk | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/mk/meta.stage.mk b/mk/meta.stage.mk index 97e4dce83e5d..c98f0c251c67 100644 --- a/mk/meta.stage.mk +++ b/mk/meta.stage.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: meta.stage.mk,v 1.71 2025/03/14 20:28:42 sjg Exp $ +# $Id: meta.stage.mk,v 1.74 2025/11/19 17:44:15 sjg Exp $ # # @(#) Copyright (c) 2011-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net @@ -38,14 +31,19 @@ CLEANFILES+= .dirdep @echo '${_dirdep}' > $@ .endif -.if defined(NO_POSIX_SHELL) || ${type printf:L:sh:Mbuiltin} == "" -_stage_file_basename = `basename $$f` -_stage_file_dirname = `dirname $$f` -_stage_target_dirname = `dirname $$t` -.else +.ifndef MAKE_POSIX_SHELL +MAKE_POSIX_SHELL != (echo $${PATH%:*}) > /dev/null 2>&1 && echo 1 || echo 0 +.export MAKE_POSIX_SHELL +.endif + +.if ${MAKE_POSIX_SHELL} _stage_file_basename = $${f\#\#*/} _stage_file_dirname = $${f%/*} _stage_target_dirname = $${t%/*} +.else +_stage_file_basename = `basename $$f` +_stage_file_dirname = `dirname $$f` +_stage_target_dirname = `dirname $$t` .endif _OBJROOT ?= ${OBJROOT:U${OBJTOP:H}} |
