From 69cb418bc80276d602ae9e4fe5a30b10ee0a957d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 20 Oct 2026 14:06:44 +0200 Subject: [PATCH] package/pkg-hare: refactor build command In order to avoid duplicating the build command, use an intermediate "target" shell variable to store the make target to be invoked for the build. This is in preparation to extending the build command. Signed-off-by: Thomas Petazzoni Acked-by: Francois Perrad Signed-off-by: Peter Korsgaard --- package/pkg-hare.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package/pkg-hare.mk b/package/pkg-hare.mk index 14e0cfce5a..15dc769311 100644 --- a/package/pkg-hare.mk +++ b/package/pkg-hare.mk @@ -49,10 +49,9 @@ ifndef $(2)_BUILD_CMDS # but in real world, the target "all" is not always the default one define $(2)_BUILD_CMDS if grep "^all:" $$($(2)_SRCDIR)Makefile > /dev/null; then \ - $(MAKE) -C $$($(2)_SRCDIR) HARE="$$(HARE_RUN_CMD)" HAREFLAGS="$$(HARE_ARCH_OPT) $$(HARE_LIBDIR_OPT)" all; \ - else \ - $(MAKE) -C $$($(2)_SRCDIR) HARE="$$(HARE_RUN_CMD)" HAREFLAGS="$$(HARE_ARCH_OPT) $$(HARE_LIBDIR_OPT)"; \ - fi + target=all ; \ + fi ; \ + $(MAKE) -C $$($(2)_SRCDIR) HARE="$$(HARE_RUN_CMD)" HAREFLAGS="$$(HARE_ARCH_OPT) $$(HARE_LIBDIR_OPT)" $${target} endef endif