From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/pkg-generic.mk: fix rule order for re{install, build, configure}
Date: Sun, 12 Feb 2023 11:57:22 +0100 [thread overview]
Message-ID: <20230212105722.GM2796@scaer> (raw)
In-Reply-To: <CADvTj4rnf9zZfsX54nqQONjUdoR-Ok13d=oi9oJRfw6tnP7adA@mail.gmail.com>
James, All,
On 2023-02-12 03:22 -0700, James Hilliard spake thusly:
> On Sun, Feb 12, 2023 at 3:11 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >
> > James, All,
> >
> > On 2023-02-12 03:02 -0700, James Hilliard spake thusly:
> > > On Sun, Feb 12, 2023 at 2:42 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > > > On 2022-10-17 21:46 -0600, James Hilliard spake thusly:
> > > > > To ensure the evaluation order is always correct use double colon
> > > > > rules to make the evaluation order explicit as per make docs:
> > > > >
> > > > > The double-colon rules for a target are executed in the order they
> > > > > appear in the makefile.
> > [--SNIP--]
> > > > So, I'd like that we get another way to fix that, if possible...
> > > I have unfortunately not found any other method to fix the execution
> > > ordering...
> >
> > What about something along the lines of (untestd!):
> >
> > $(1)-rebuild: $(1): $(1)-clean-for-rebuild
> > $(1)-rebuild: $(1)
>
> That would appear to be invalid syntax.
>
> >
> > We already use such a construct in package/pkg-kconfig.mk, but only
> > once, so this is not as if it were widespread either...
>
> I don't see anything like that there,
240: $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_%
So, this looks like it is named "target pattern", and it works with a
pattern (eh!).
$ cat Makefile
1 all: a
2
3 a:
4 @echo a
5
6 a-clean:
7 @sleep 1
8 @echo a-clean
9
10 a-rebuild: %-rebuild: %-clean
11 a-rebuild: a
However, that does not work with parallel builds:
$ make
a
$ make a
a
$ make a-rebuild
a-clean
a
$ make -j a-rebuild
a
a-clean
However, you stated in a previous reply:
So unlike the legal-info issue using .NOTPARALLEL would not work
here as these make targets do need to work with parallel builds.
I don't think that's true. Indeed, foo-rebuild is usually done after a
ful build, when iterating over the foo package, iether to test a new
source tree (with ocerride-ssrcdir) or to test fixes in foo.mk. In
either case, we do not need a top-level parallel build, because only one
package, foo, will be built.
So, even in this case, we should be able to use .NOTPARALLEL, no?
It also means that the kconfig rule I mentionned above, does not work
with top-level parallel builds, but that's OK: it's only used to spawn
kconfig configurators (menuconfig et al.), so it should not be used with
top-level parallel, and thus should require .NOTPARALLEL as well.
Meh, TLPB and shuffling are really uncovering issues everywhere... :-(
Regards,
Yann E. MORIN.
> just this which isn't doing anything
> unusual with multiple prerequisites that require a specific execution
> order like the re{install,build,configure} rules in pkg-generic.mk:
>
> # Force olddefconfig again on -reconfigure
> $(1)-clean-for-reconfigure: $(1)-clean-kconfig-for-reconfigure
>
> $(1)-clean-kconfig-for-reconfigure:
> rm -f $$($(2)_DIR)/$$($(2)_KCONFIG_STAMP_DOTCONFIG)
>
> >
> > Still, I think it is more easy to read...
> >
> > Regards,
> > Yann E. MORIN.
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> > | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> > '------------------------------^-------^------------------^--------------------'
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-02-12 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 3:46 [Buildroot] [PATCH 1/1] package/pkg-generic.mk: fix rule order for re{install, build, configure} James Hilliard
2023-01-09 22:07 ` Charles Hardin
2023-02-12 9:42 ` Yann E. MORIN
2023-02-12 10:02 ` James Hilliard
2023-02-12 10:11 ` Yann E. MORIN
2023-02-12 10:22 ` James Hilliard
2023-02-12 10:57 ` Yann E. MORIN [this message]
2023-02-12 11:17 ` James Hilliard
2023-02-14 21:22 ` Arnout Vandecappelle
2023-02-14 21:24 ` Arnout Vandecappelle
2023-07-13 22:33 ` James Hilliard
2023-10-01 16:05 ` Arnout Vandecappelle via buildroot
2023-10-13 14:41 ` Peter Korsgaard
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=20230212105722.GM2796@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=james.hilliard1@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