The value can be overridden in which case the default value is ignored.
+ KBUILD_ABS_SRCTREE
+ --------------------------------------------------
+ Kbuild uses a relative path to point to the tree when possible. For instance,
+ when building in the source tree, the source tree path is '.'
+
+ Setting this flag requests Kbuild to use absolute path to the source tree.
+ There are some useful cases to do so, like when generating tag files with
+ absolute path entries etc.
+
KBUILD_SIGN_PIN
---------------------------------------------------
+---------------
This variable allows a passphrase or PIN to be passed to the sign-file
utility when signing kernel modules, if the private key requires such.
means for an architecture to override the defaults.
---- 6.2 Add prerequisites to archheaders:
+6.2 Add prerequisites to archheaders
+------------------------------------
The archheaders: rule is used to generate header files that
- may be installed into user space by "make header_install" or
- "make headers_install_all". In order to support
- "make headers_install_all", this target has to be able to run
- on an unconfigured tree, or a tree configured for another
- architecture.
+ may be installed into user space by "make header_install".
It is run before "make archprepare" when run on the
architecture itself.
In this example, extra-y is used to list object files that
shall be built, but shall not be linked as part of built-in.a.
+ header-test-y
+
+ header-test-y specifies headers (*.h) in the current directory that
+ should be compile tested to ensure they are self-contained,
+ i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled,
+ this builds them as part of extra-y.
+
+ header-test-pattern-y
+
+ This works as a weaker version of header-test-y, and accepts wildcard
+ patterns. The typical usage is:
+
+ header-test-pattern-y += *.h
+
+ This specifies all the files that matches to '*.h' in the current
+ directory, but the files in 'header-test-' are excluded.
---- 6.7 Commands useful for building a boot image
+6.7 Commands useful for building a boot image
+---------------------------------------------
- Kbuild provides a few macros that are useful when building a
- boot image.
+ Kbuild provides a few macros that are useful when building a
+ boot image.
if_changed
-
if_changed is the infrastructure used for the following commands.
- Usage:
+ Usage::
+
target: source(s) FORCE
$(call if_changed,ld/objcopy/gzip/...)
# if_changed_dep - as if_changed, but uses fixdep to reveal dependencies
# including used config symbols
# if_changed_rule - as if_changed but execute rule instead
-# See Documentation/kbuild/makefiles.txt for more info
+# See Documentation/kbuild/makefiles.rst for more info
ifneq ($(KBUILD_NOCMDDEP),1)
- # Check if both arguments are the same including their order. Result is empty
+ # Check if both commands are the same including their order. Result is empty
# string if equal. User may override this check using make KBUILD_NOCMDDEP=1
- arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \
+ cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \
$(subst $(space),$(space_escape),$(strip $(cmd_$1))))
else
- arg-check = $(if $(strip $(cmd_$@)),,1)
+ cmd-check = $(if $(strip $(cmd_$@)),,1)
endif
# Replace >$< with >$$< to preserve $ when reloading the .cmd file