From: tb Date: Fri, 9 Dec 2022 09:30:54 +0000 (+0000) Subject: Allow overriding default run-regress-* targets X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=08937423c95ea7b856e6013704e1d01025449438;p=openbsd Allow overriding default run-regress-* targets Overriding a default run-regress-* target with custom commands is already possible and done by many tests. The fact that it currently works depends on behavior in the BUGs section of make.1, however. The fix is not to add commands if the target is already defined with commands. tested by anton correct fix from espie, ok anton --- diff --git a/share/mk/bsd.regress.mk b/share/mk/bsd.regress.mk index 8cdeef55208..6f14dd1a386 100644 --- a/share/mk/bsd.regress.mk +++ b/share/mk/bsd.regress.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.regress.mk,v 1.24 2021/08/31 23:33:05 bluhm Exp $ +# $OpenBSD: bsd.regress.mk,v 1.25 2022/12/09 09:30:54 tb Exp $ # Documented in bsd.regress.mk(5) # No man pages for regression tests. @@ -33,7 +33,9 @@ _REGRESS_OUT= | tee -a ${REGRESS_LOG} ${_REGRESS_TMP} 2>&1 > /dev/null .for p in ${PROG} ${PROGS} run-regress-$p: $p +. if !commands(run-regress-$p) ./$p +. endif .PHONY: run-regress-$p .endfor