fix(config): fix config dep tracking and reorganise config build dir#343
Open
josecm wants to merge 3 commits into
Open
fix(config): fix config dep tracking and reorganise config build dir#343josecm wants to merge 3 commits into
josecm wants to merge 3 commits into
Conversation
The config dep rule used statically computed config_obj and config_dep variables derived from config_build_dir, which did not match the actual object path after the cur_dir/config_dir → build_dir remapping applied to objs-y. As a result, .incbin extra dependencies were silently tracking the wrong target and changes to embedded binary files would not trigger a recompile of the config object. Fix by routing all config-objs-y directly into config_build_dir after the remapping step, so the actual object location is always known. Replace the static config_obj/config_dep pair with a single config_dep path derived from config_build_dir, and derive the -MT object target dynamically from $@ so both always agree. Also add a dedicated dep pattern rule for config_build_dir so out-of-tree config sources are found correctly. Absolute-path entries in config-objs-y are mapped under build_dir preserving the full path, matching the previous behaviour. Signed-off-by: Jose Martins <josemartins90@gmail.com>
Declare an empty all: rule before any -include directives so that the default target is always all, regardless of targets defined in any included makefile (e.g. config.mk from an external CONFIG_REPO). Signed-off-by: Jose Martins <josemartins90@gmail.com>
Organise the config portion of the build tree: - config_defs_gen.h moves to config_build_dir/inc/ and inc_dirs is updated accordingly. - Absolute-path config-objs-y entries move from build_dir to config_build_dir/external/, preserving the full filesystem path for traceability. A dedicated dep rule is added for this location. Signed-off-by: Jose Martins <josemartins90@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
into config_build_dir so the -MT target in the dep rule always matches
the actual object location. Previously, changes to embedded guest
binaries would not trigger a recompile.
all:as the default make target before any -include directives,preventing targets from included makefiles (e.g. config.mk from an
external CONFIG_REPO) from silently becoming the default.
config-objs-y mirror the config_dir layout, absolute-path entries go
under external/, and config_defs_gen.h moves to inc/.