From: Peter Korsgaard <peter@korsgaard.com>
To: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Francois Perrad <francois.perrad.86@gmail.com>
Subject: Re: [Buildroot] [PATCH 1/2] package/pkg-hare: refactor build command
Date: Tue, 20 Oct 2026 20:42:04 +0200 [thread overview]
Message-ID: <87v76wuscj.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20261020120646.1306735-1-thomas.petazzoni@bootlin.com> (Thomas Petazzoni via buildroot's message of "Tue, 20 Oct 2026 14:06:44 +0200")
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> 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}
I already pushed, but this presumably will break quite badly if someone
has a 'target' environment variable set. Maybe we should explicitly set
it to the empty string in the else clause?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-10-20 18:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v76wuscj.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=francois.perrad.86@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox