Import bmake-20220726

Relevant/interesting changes:

	* Auto-create objdir for bmake/unit-tests if appropriate
vendor/NetBSD/bmake vendor/NetBSD/bmake/20220726
Simon J. Gerraty 2 months ago
parent 308a28d6cd
commit 31a96ca5f0
  1. 6
      ChangeLog
  2. 21
      Makefile
  3. 2
      VERSION
  4. 3
      unit-tests/Makefile

@ -1,3 +1,9 @@
2022-07-26 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20220726
* Auto-create objdir for bmake/unit-tests if appropriate
2022-07-24 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20220724

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.117 2021/12/04 18:51:30 sjg Exp $
# $Id: Makefile,v 1.120 2022/07/26 23:02:54 sjg Exp $
PROG= bmake
@ -215,7 +215,24 @@ install-mk:
# A simple unit-test driver to help catch regressions
TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
accept test:
accept test: .NOMETA
cd ${.CURDIR}/unit-tests && \
MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}}
.if make(test) && ${MK_AUTO_OBJ} == "yes"
# The test target above visits unit-tests with -r -m /
# which prevents MK_AUTO_OBJ doing its job
# so do it here
.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != ""
_utobj = ${.OBJDIR}/unit-tests
.else
_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj}
.endif
utobj: .NOMETA
@test -d ${_utobj} && exit 0; \
echo "[Creating ${_utobj}...]"; \
umask ${OBJDIR_UMASK:U002}; \
mkdir -p ${_utobj}
test: utobj
.endif

@ -1,2 +1,2 @@
# keep this compatible with sh and make
_MAKE_VERSION=20220724
_MAKE_VERSION=20220726

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.181 2022/06/13 00:18:20 sjg Exp $
# $Id: Makefile,v 1.182 2022/07/26 19:39:32 sjg Exp $
#
# $NetBSD: Makefile,v 1.318 2022/06/10 21:28:50 rillig Exp $
#
@ -501,6 +501,7 @@ ENV.depsrc-optional+= TZ=UTC
ENV.deptgt-phony+= MAKESYSPATH=.
ENV.directive-undef= ENV_VAR=env-value
ENV.envfirst= FROM_ENV=value-from-env
ENV.opt-m-include-dir= ${MAKEOBJDIR:DMAKEOBJDIR=${MAKEOBJDIR}}
ENV.varmisc= FROM_ENV=env
ENV.varmisc+= FROM_ENV_BEFORE=env
ENV.varmisc+= FROM_ENV_AFTER=env

Loading…
Cancel
Save