-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make: allow some ordering of package builds #6113
Conversation
Hm, does anyone know how to get rid of this:
|
Break the circle ;-). |
Yeah. It is caused by making all packages depend on all buildfirst packages. How can I filter the dependencies so the prerequisite doesn't include the target? |
mhh… using |
@@ -573,3 +573,8 @@ USEPKG := $(sort $(USEPKG)) | |||
ifneq ($(OLD_USEMODULE) $(OLD_USEPKG),$(USEMODULE) $(USEPKG)) | |||
include $(RIOTBASE)/Makefile.dep | |||
endif | |||
|
|||
USEPKG_BUILDFIRST := nordic_softdevice_ble |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this ordering problem persist for packages in USEPKG_BUILDFIRST
with the proposed solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I consider this a quickfix for the problem at hand. I'd prefer full dependencies, or split download/patch and compile steps. But they'd be a lot more work to implement...
ping This fixes everything for nrf52dk which uses a package name > nordic_softdevice_ble... |
Is this fixed?
|
No, but I don't know how to fix it, and it is purely cosmetic. |
I argue that it is not just cosmetic if there is a circular dependency. That's a conceptual issue. |
In general I totally agree. In this specific case the circular dependency is spotted where defined and removed by make, in this one line, and there's no easy way to remove the circular dependency beforehand. It also doesn't harm in any way other than the notice. |
Here is one easy (not sure of ugly ^^") way: diff --git a/Makefile.include b/Makefile.include
index fa9e85b..238320b 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -303,8 +303,13 @@ USEMODULE_INCLUDES_ = $(shell echo $(USEMODULE_INCLUDES) | tr ' ' '\n' | awk '!a
INCLUDES += $(USEMODULE_INCLUDES_:%=-I%)
-.PHONY: $(USEPKG:%=${BINDIR}/%.a)
-$(USEPKG:%=${BINDIR}/%.a): $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG_BUILDFIRST:%=${BINDIR}/%.a)
+USEPKG_BUILDLATER := $(filter-out $(USEPKG_BUILDFIRST),$(USEPKG))
+.PHONY: $(USEPKG_BUILDLATER:%=${BINDIR}/%.a)
+$(USEPKG_BUILDLATER:%=${BINDIR}/%.a): $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG_BUILDFIRST:%=${BINDIR}/%.a)
+ @mkdir -p ${BINDIR}
+ "$(MAKE)" -C $(RIOTPKG)/$(patsubst ${BINDIR}/%.a,%,$@)
+
+$(USEPKG_BUILDFIRST:%=${BINDIR}/%.a): $(RIOTBUILD_CONFIG_HEADER_C)
@mkdir -p ${BINDIR}
"$(MAKE)" -C $(RIOTPKG)/$(patsubst ${BINDIR}/%.a,%,$@)
|
No activity for over half a year. Closing as memo for now. Reopen if you disagree. |
Previously, packages would be built in alphabetical ordering and possibly in parallel.
This PR adds an option to build certain packages prior to others and adds them as dependencies.
Fixes #6022.