2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/Documentation
Masahiro Yamada eb47ee0181 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>
2025-03-15 21:22:52 +09:00
..
ABI First batch of fixes for 6.14. Nothing really stands out, 2025-01-30 12:24:20 -08:00
accel
accounting Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
admin-guide Kbuild fixes for v6.14 (3rd) 2025-03-09 09:23:14 -10:00
arch powerpc fix for 6.14 #4 2025-02-25 20:06:15 -08:00
block Documentation: ublk: Drop Stefan Hajnoczi's message footnote 2025-01-28 15:02:17 -07:00
bpf
cdrom
core-api Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
cpu-freq
crypto
dev-tools kbuild: remove EXTRA_*FLAGS support 2025-03-15 21:16:21 +09:00
devicetree Char/Misc/IIO driver fixes for 6.14-rc6 2025-03-09 09:07:54 -10:00
doc-guide
driver-api driver core: add a faux bus for use when a simple device/bus is needed 2025-02-13 16:58:51 +01:00
fault-injection
fb
features
filesystems doc: correcting two prefix errors in idmappings.rst 2025-03-05 11:54:18 +01:00
firmware_class
firmware-guide
fpga
gpu drm: xlnx: zynqmp_dpsub: Fix kernel doc 2025-01-16 12:45:16 +01:00
hid HID: THC: Add documentation 2025-01-09 10:14:14 +01:00
hwmon hwmon updates for v6.14-rc1 2025-01-22 10:16:48 -08:00
i2c
iio iio: light: Add support for TI OPT4060 color sensor 2024-12-28 14:28:13 +00:00
images
infiniband
input
isdn
kbuild kbuild: add Kbuild bash completion 2025-03-15 21:22:52 +09:00
kernel-hacking
leds Documentation:leds: Add leds-st1202.rst 2025-01-09 10:30:23 +00:00
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices
mm The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
netlabel
netlink net: ethtool: tsconfig: Fix netlink type of hwtstamp flags 2025-02-06 16:35:21 -08:00
networking BPF fixes: 2025-02-20 15:37:17 -08:00
nvdimm
nvme Documentation: Document the NVMe PCI endpoint target driver 2025-01-10 19:30:49 -08:00
PCI pci-v6.14-changes 2025-01-25 16:03:40 -08:00
pcmcia
peci
power Two fixes for footnote-related warnings that appeared with Sphinx 8.x. 2025-01-30 10:57:19 -08:00
process MAINTAINERS: update Nick's contact info 2025-02-17 22:40:04 -08:00
RCU
rust
scheduler sched/rt: Update limit of sched_rt sysctl in documentation 2025-03-06 10:21:31 +01:00
scsi scsi: documentation: Corrections for struct updates 2025-01-10 15:15:30 -05:00
security
sound Merge branch 'for-linus' into for-next 2025-01-20 09:25:33 +01:00
sphinx
sphinx-static
spi
staging
sunrpc/xdr nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
target
tee
timers
tools
trace tracing updates for v6.14: 2025-01-23 17:51:16 -08:00
translations MAINTAINERS: update Nick's contact info 2025-02-17 22:40:04 -08:00
usb USB: usbip: Update USB/IP OP_REP_IMPORT documentation. 2024-12-27 13:07:22 +01:00
userspace-api landlock: Minor typo and grammar fixes in IPC scoping documentation 2025-02-14 09:23:08 +01:00
virt KVM: s390: fake memslot for ucontrol VMs 2025-01-31 12:03:52 +01:00
w1
watchdog
wmi docs: platform/x86: wmi: mention tool for invoking WMI methods 2025-01-09 13:38:39 +02:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig
Makefile tools: ynl: move python code to separate sub-directory 2025-01-09 12:53:27 -08:00
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst Documentation: Document the NVMe PCI endpoint target driver 2025-01-10 19:30:49 -08:00