From a696ef090fae8654cbfc5f28a27009857b30edee Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 20 Nov 2025 16:00:23 -0500 Subject: [PATCH] make: expand on plain target or target with argument --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 839ba7cce..2d253f1a4 100644 --- a/Makefile +++ b/Makefile @@ -47,15 +47,18 @@ list: $$(if [ -n "$$(${MAKE} -C ${PLUGIN_DIR} -v PLUGIN_OBSOLETE)" ]; then echo "(pending removal)"; fi) .endfor -# shared targets that are sane to run from the root directory +# known good targets (expanded below) TARGETS= clean glint lint revision style sweep test -.for TARGET in ${TARGETS} -${TARGET}: -. for PLUGIN_DIR in ${PLUGIN_DIRS} - @echo ">>> Entering ${PLUGIN_DIR}" - @${MAKE} -C ${PLUGIN_DIR} ${TARGET} -. endfor +.for _TARGET in ${.TARGETS} +__TARGET= ${TARGETS:M${_TARGET:C/-.*//}} +. if "${__TARGET}" != "" +${_TARGET}: +. for PLUGIN_DIR in ${PLUGIN_DIRS} + @echo ">>> Entering ${PLUGIN_DIR} with target '${_TARGET}'" + @${MAKE} -C ${PLUGIN_DIR} ${_TARGET} +. endfor +. endif .endfor license: