Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkg-generic.mk: fix rule order for re{install, build, configure}
@ 2022-10-18  3:46 James Hilliard
  2023-01-09 22:07 ` Charles Hardin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: James Hilliard @ 2022-10-18  3:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Thomas Petazzoni

These command rely on the clean operations being first so that the
stamp files being deleted will rebuild the targets.

The execution ordering of the clean and rebuild operations may
change, for example if --shuffle=reversed is set.

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.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/pkg-generic.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index f24e03a325..6cb461af90 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1057,17 +1057,20 @@ endif
 			rm -f $$($(2)_TARGET_INSTALL_IMAGES)
 			rm -f $$($(2)_TARGET_INSTALL_HOST)
 
-$(1)-reinstall:		$(1)-clean-for-reinstall $(1)
+$(1)-reinstall::		$(1)-clean-for-reinstall
+$(1)-reinstall::		$(1)
 
 $(1)-clean-for-rebuild: $(1)-clean-for-reinstall
 			rm -f $$($(2)_TARGET_BUILD)
 
-$(1)-rebuild:		$(1)-clean-for-rebuild $(1)
+$(1)-rebuild::		$(1)-clean-for-rebuild
+$(1)-rebuild::		$(1)
 
 $(1)-clean-for-reconfigure: $(1)-clean-for-rebuild
 			rm -f $$($(2)_TARGET_CONFIGURE)
 
-$(1)-reconfigure:	$(1)-clean-for-reconfigure $(1)
+$(1)-reconfigure::	$(1)-clean-for-reconfigure
+$(1)-reconfigure::	$(1)
 
 # define the PKG variable for all targets, containing the
 # uppercase package variable prefix
-- 
2.34.1

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

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

end of thread, other threads:[~2023-10-13 14:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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