kbuild: make cc-version available in kbuild files
Move $(CC) support functions to Kbuild.include so they are available in the kbuild files. In addition the following was done: o as-option documented in Documentation/kbuild/makefiles.txt o Moved documentation to new section to match new scope of functions o added cc-ifversion used to conditionally select a text string dependent on actual $(CC) version o documented cc-ifversion o change so Kbuild.include is read before the kbuild file Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
b39927cf4c
commit
20a468b513
4 changed files with 136 additions and 102 deletions
|
|
@ -10,11 +10,12 @@ __build:
|
|||
# Read .config if it exist, otherwise ignore
|
||||
-include .config
|
||||
|
||||
include scripts/Kbuild.include
|
||||
|
||||
# The filename Kbuild has precedence over Makefile
|
||||
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
|
||||
include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
|
||||
|
||||
include scripts/Kbuild.include
|
||||
include scripts/Makefile.lib
|
||||
|
||||
ifdef host-progs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue