diff options
| author | Ilias Apalodimas <[email protected]> | 2025-05-20 08:21:12 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-05-29 18:42:37 -0600 |
| commit | afba83ad89d5b17fc49f47df3a8c031a23815d1a (patch) | |
| tree | 8a622490dbb60b9396cf88683d794939fd63f054 /scripts/Kbuild.include | |
| parent | be2bdfd0199f37fed0ce19f90840f79d185e20d1 (diff) | |
kbuild: de-duplicate fixdep usage
Backported from the linux kernel
commit e4aca4595005 ("kbuild: de-duplicate fixdep usage")
A lot of the kernels kbuild depend on that patch. Backport it and pull in
the 'rule_as_o_S'a rule as well. This might end up being unused but it
doesn't break anything and makes diffing the files easier.
Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'scripts/Kbuild.include')
| -rw-r--r-- | scripts/Kbuild.include | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 054dd157485..7468223d323 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -266,10 +266,13 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ # Execute the command and also postprocess generated .d dependencies file. if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ @set -e; \ + $(cmd_and_fixdep), @:) + +cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd, @:) + mv -f $(dot-target).tmp $(dot-target).cmd; # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, |
