Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/pkg-hare: refactor build command
@ 2026-10-20 12:06 Thomas Petazzoni via buildroot
  2026-10-20 12:06 ` [Buildroot] [PATCH 2/2] package/pkg-hare: move cache directory outside of $(HOME) Thomas Petazzoni via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-20 12:06 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Francois Perrad

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 <thomas.petazzoni@bootlin.com>
---
 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
 
-- 
2.56.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-10-20 18:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 12:06 [Buildroot] [PATCH 1/2] package/pkg-hare: refactor build command Thomas Petazzoni via buildroot
2026-10-20 12:06 ` [Buildroot] [PATCH 2/2] package/pkg-hare: move cache directory outside of $(HOME) Thomas Petazzoni via buildroot
2026-10-20 12:55   ` Fiona Klute via buildroot
2026-10-20 13:17     ` Thomas Petazzoni via buildroot
2026-10-20 16:43   ` Peter Korsgaard
2026-10-20 18:03     ` François PERRAD
2026-10-20 18:19     ` Thomas Petazzoni via buildroot
2026-10-20 18:32       ` Peter Korsgaard
2026-10-20 18:26 ` [Buildroot] [PATCH 1/2] package/pkg-hare: refactor build command François PERRAD
2026-10-20 18:34 ` Peter Korsgaard
2026-10-20 18:42 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox