linux/Documentation/kbuild
Masahiro Yamada faabed295c kbuild: introduce hostprogs-always-y and userprogs-always-y
To build host programs, you need to add the program names to 'hostprogs'
to use the necessary build rule, but it is not enough to build them
because there is no dependency.

There are two types of host programs: built as the prerequisite of
another (e.g. gen_crc32table in lib/Makefile), or always built when
Kbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile).

The latter is typical in Makefiles under scripts/, which contains host
programs globally used during the kernel build. To build them, you need
to add them to both 'hostprogs' and 'always-y'.

This commit adds hostprogs-always-y as a shorthand.

The same applies to user programs. net/bpfilter/Makefile builds
bpfilter_umh on demand, hence always-y is unneeded. In contrast,
programs under samples/ are added to both 'userprogs' and 'always-y'
so they are always built when Kbuild visits the Makefiles.

userprogs-always-y works as a shorthand.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2020-08-10 01:32:59 +09:00
..
gcc-plugins.rst docs: move gcc-plugins to the kbuild manual 2020-03-10 11:20:46 -06:00
headers_install.rst Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
index.rst Kbuild updates for v5.7 2020-03-31 16:03:39 -07:00
issues.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kbuild.rst kbuild: support LLVM=1 to switch the default tools to Clang/LLVM 2020-04-09 03:18:21 +09:00
kconfig-language.rst kbuild: Replace HTTP links with HTTPS ones 2020-08-10 01:32:59 +09:00
kconfig-macro-language.rst kbuild: doc: fix references to other documents 2020-03-13 10:02:27 +09:00
Kconfig.recursion-issue-01 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.recursion-issue-02 kbuild: Replace HTTP links with HTTPS ones 2020-08-10 01:32:59 +09:00
kconfig.rst kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf 2020-01-07 02:18:39 +09:00
Kconfig.select-break kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
llvm.rst kbuild: Replace HTTP links with HTTPS ones 2020-08-10 01:32:59 +09:00
makefiles.rst kbuild: introduce hostprogs-always-y and userprogs-always-y 2020-08-10 01:32:59 +09:00
modules.rst docs: kbuild: fix ReST formatting 2020-06-28 12:16:55 +09:00
reproducible-builds.rst gcc-plugins: fix gcc-plugins directory path in documentation 2020-06-28 12:16:55 +09:00