[Buildroot] [PATCH 1/1] Makefile: fix rule order for legal-info
James Hilliard
james.hilliard1 at gmail.com
Sat Feb 11 18:43:46 UTC 2023
This command relies on the clean/prepare operations being in a
specific order.
Currently the execution ordering of the clean/prepare 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 at gmail.com>
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 4880b426b5..09575a5e3c 100644
--- a/Makefile
+++ b/Makefile
@@ -839,7 +839,9 @@ legal-info-prepare: $(LEGAL_INFO_DIR)
@cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
.PHONY: legal-info
-legal-info: legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \
+legal-info:: legal-info-clean
+legal-info:: legal-info-prepare
+legal-info:: $(foreach p,$(PACKAGES),$(p)-all-legal-info) \
$(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
@cat support/legal-info/README.header >>$(LEGAL_REPORT)
@if [ -r $(LEGAL_WARNINGS) ]; then \
--
2.34.1
More information about the buildroot
mailing list