mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
kbuild: add kbuild-file macro
While building, installing, cleaning, Kbuild visits sub-directories and includes 'Kbuild' or 'Makefile' that exists there. Add 'kbuild-file' macro, and reuse it from scripts/Makefie.* Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Alexander Lobakin <alobakin@pm.me> Tested-by: Alexander Lobakin <alobakin@pm.me>
This commit is contained in:
@@ -40,6 +40,11 @@ escsq = $(subst $(squote),'\$(squote)',$1)
|
||||
# Quote a string to pass it to C files. foo => '"foo"'
|
||||
stringify = $(squote)$(quote)$1$(quote)$(squote)
|
||||
|
||||
###
|
||||
# The path to Kbuild or Makefile. Kbuild has precedence over Makefile.
|
||||
kbuild-dir = $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
|
||||
kbuild-file = $(or $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Makefile)
|
||||
|
||||
###
|
||||
# Easy method for doing a status message
|
||||
kecho := :
|
||||
|
Reference in New Issue
Block a user