Thread (2 messages) 2 messages, 2 authors, 2019-01-21

Re: [PATCH v2 3/4] kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)

flat view

From: Rob Herring <robh@kernel.org>
Date: 2019-01-21 15:53:22
Also in: linux-devicetree, linux-kbuild, linux-mips, linux-s390, lkml

On Thu, Jan 17, 2019 at 07:02:43PM +0900, Masahiro Yamada wrote:
In Kbuild, if_changed and friends must have FORCE as a prerequisite.

Hence, $(filter-out FORCE,$^) or $(filter-out $(PHONY),$^) is a common
pattern to get the names of all the prerequisites except phony targets.

Add real-prereqs as a shorthand.

Note:
We cannot replace $(filter %.o,$^) in cmd_link_multi-m because $^ may
include auto-generated dependencies from the .*.cmd file when a single
object module is changed into a multi object module. Refer to commit
69ea912fda74 ("kbuild: remove unneeded link_multi_deps"). I added some
comment to avoid accidental breakage.

Signed-off-by: Masahiro Yamada <redacted>
---

The patch context depends on some other ones.
Please use 'git am -C1' if you want to test this
on Linus' tree.


Changes in v2:
  - clean up arch/s390/boot/Makefile as well

 Documentation/devicetree/bindings/Makefile |  2 +-
Acked-by: Rob Herring <robh@kernel.org>
 arch/mips/boot/Makefile                    |  2 +-
 arch/powerpc/boot/Makefile                 |  2 +-
 arch/s390/boot/Makefile                    |  2 +-
 arch/x86/realmode/rm/Makefile              |  3 +--
 scripts/Kbuild.include                     |  4 ++++
 scripts/Makefile.build                     |  9 ++++++---
 scripts/Makefile.lib                       | 18 +++++++++---------
 scripts/Makefile.modpost                   |  2 +-
 9 files changed, 25 insertions(+), 19 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help