summaryrefslogtreecommitdiffstats
path: root/scripts/subarch.include
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2025-03-07 00:56:22 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2025-03-15 21:22:52 +0900
commiteb47ee018173f144f10eb38a3f7bd9f17ec6329e (patch)
treea7d0988d7c636d08ba67ed29877e18ceca10f680 /scripts/subarch.include
parentf757f6011c92b5a01db742c39149bed9e526478f (diff)
downloadlinux-stable-eb47ee018173f144f10eb38a3f7bd9f17ec6329e.tar.gz
linux-stable-eb47ee018173f144f10eb38a3f7bd9f17ec6329e.tar.bz2
linux-stable-eb47ee018173f144f10eb38a3f7bd9f17ec6329e.zip
kbuild: add Kbuild bash completion
Kernel build commands can sometimes be long, particularly when cross-compiling, making them tedious to type and prone to mistypes. This commit introduces bash completion support for common variables and targets in Kbuild. For installation instructions, please refer to the documentation in Documentation/kbuild/bash-completion.rst. The following examples demonstrate how this saves typing. [Example 1] a long command line for cross-compiling $ make A<TAB> -> completes 'A' to 'ARCH=' $ make ARCH=<TAB> -> displays all supported architectures $ make ARCH=arm64 CR<TAB> -> completes 'CR' to 'CROSS_COMPILE=' $ make ARCH=arm64 CROSS_COMPILE=<TAB> -> displays installed toolchains $ make ARCH=arm64 CROSS_COMPILE=aa<TAB> -> completes 'CROSS_COMPILE=aa' to 'CROSS_COMPILE=aarch64-linux-gnu-' $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- def<TAB> -> completes 'def' to 'defconfig' [Example 2] a single build target $ make f<TAB> -> completes 'f' to 'fs/' $ make fs/<TAB> -> displays objects and sub-directories in fs/ $ make fs/xf<TAB> -> completes 'fs/xf' to 'fs/xfs/' $ make fs/xfs/l<TAB> -> completes 'fs/xfs/l' to 'fs/xfs/libxfs/xfs_' $ make fs/xfs/libxfs/xfs_g<TAB> -> completes 'fs/xfs/libxfs/xfs_g' to 'fs/xfs/libxfs/xfs_group.o' This does not aim to provide a complete list of variables and targets, as there are too many. However, it covers variables and targets used in common scenarios, and I hope this is useful enough. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de> Tested-by: Nicolas Schier <n.schier@avm.de>
Diffstat (limited to 'scripts/subarch.include')
0 files changed, 0 insertions, 0 deletions