if BUILD_BASH_COMPLETION

if BUILD_BLKID
dist_bashcompletion_DATA += bash-completion/blkid
endif
if BUILD_CAL
dist_bashcompletion_DATA += bash-completion/cal
endif
if BUILD_COL
dist_bashcompletion_DATA += bash-completion/col
endif
if BUILD_COLCRT
dist_bashcompletion_DATA += bash-completion/colcrt
endif
if BUILD_COLRM
dist_bashcompletion_DATA += bash-completion/colrm
endif
if BUILD_COLUMN
dist_bashcompletion_DATA += bash-completion/column
endif
if BUILD_FINCORE
dist_bashcompletion_DATA += bash-completion/fincore
endif
if BUILD_FINDFS
dist_bashcompletion_DATA += bash-completion/findfs
endif
if BUILD_FINDMNT
dist_bashcompletion_DATA += bash-completion/findmnt
endif
if BUILD_FLOCK
dist_bashcompletion_DATA += bash-completion/flock
endif
if BUILD_GETOPT
dist_bashcompletion_DATA += bash-completion/getopt
endif
if BUILD_HEXDUMP
dist_bashcompletion_DATA += bash-completion/hexdump
endif
if BUILD_IPCMK
dist_bashcompletion_DATA += bash-completion/ipcmk
endif
if BUILD_IPCRM
dist_bashcompletion_DATA += bash-completion/ipcrm
endif
if BUILD_IPCS
dist_bashcompletion_DATA += bash-completion/ipcs
endif
if BUILD_ISOSIZE
dist_bashcompletion_DATA += bash-completion/isosize
endif
if BUILD_LOGGER
dist_bashcompletion_DATA += bash-completion/logger
endif
if BUILD_LOOK
dist_bashcompletion_DATA += bash-completion/look
endif
if BUILD_LSIPC
dist_bashcompletion_DATA += bash-completion/lsipc
endif
if BUILD_LSNS
dist_bashcompletion_DATA += bash-completion/lsns
endif
if BUILD_MCOOKIE
dist_bashcompletion_DATA += bash-completion/mcookie
endif
if BUILD_MKFS
dist_bashcompletion_DATA += bash-completion/mkfs
endif
if BUILD_MKSWAP
dist_bashcompletion_DATA += bash-completion/mkswap
endif
if BUILD_NAMEI
dist_bashcompletion_DATA += bash-completion/namei
endif
if BUILD_PRLIMIT
dist_bashcompletion_DATA += bash-completion/prlimit
endif
if BUILD_READPROFILE
dist_bashcompletion_DATA += bash-completion/readprofile
endif
if BUILD_RENICE
dist_bashcompletion_DATA += bash-completion/renice
endif
if BUILD_REV
dist_bashcompletion_DATA += bash-completion/rev
endif
if BUILD_SCRIPT
dist_bashcompletion_DATA += bash-completion/script
endif
if BUILD_SCRIPTREPLAY
dist_bashcompletion_DATA += bash-completion/scriptreplay
endif
if BUILD_SETSID
dist_bashcompletion_DATA += bash-completion/setsid
endif
if BUILD_WHEREIS
dist_bashcompletion_DATA += bash-completion/whereis
endif
if BUILD_WIPEFS
dist_bashcompletion_DATA += bash-completion/wipefs
endif
if BUILD_FSCK
dist_bashcompletion_DATA += bash-completion/fsck
endif

if BUILD_BFS
dist_bashcompletion_DATA += bash-completion/mkfs.bfs
endif

if BUILD_MINIX
dist_bashcompletion_DATA += \
	bash-completion/fsck.minix \
	bash-completion/mkfs.minix
endif

if BUILD_CRAMFS
dist_bashcompletion_DATA += \
	bash-completion/fsck.cramfs \
	bash-completion/mkfs.cramfs
endif
if BUILD_PARTX
dist_bashcompletion_DATA += \
	bash-completion/addpart \
	bash-completion/delpart \
	bash-completion/resizepart \
	bash-completion/partx
endif
if BUILD_RAW
dist_bashcompletion_DATA += bash-completion/raw
endif
if BUILD_SWAPLABEL
dist_bashcompletion_DATA += bash-completion/swaplabel
endif
if BUILD_FDFORMAT
dist_bashcompletion_DATA += bash-completion/fdformat
endif
if BUILD_BLOCKDEV
dist_bashcompletion_DATA += bash-completion/blockdev
endif

if BUILD_FDISK
dist_bashcompletion_DATA += bash-completion/fdisk
endif
if BUILD_SFDISK
dist_bashcompletion_DATA += bash-completion/sfdisk
endif
if BUILD_CFDISK
dist_bashcompletion_DATA += bash-completion/cfdisk
endif

if BUILD_CHFN_CHSH
dist_bashcompletion_DATA += \
	bash-completion/chfn \
	bash-completion/chsh
endif
if BUILD_LAST
dist_bashcompletion_DATA += bash-completion/last
endif
if BUILD_LSLOGINS
dist_bashcompletion_DATA += bash-completion/lslogins
endif
if BUILD_NEWGRP
dist_bashcompletion_DATA += bash-completion/newgrp
endif

if BUILD_SU
dist_bashcompletion_DATA += bash-completion/su
endif

if BUILD_RUNUSER
install-data-hook-bashcomp-runuser::
if BUILD_SU
	ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
else
	cp $(top_srcdir)/bash-completion/su $(DESTDIR)$(bashcompletiondir)/runuser
endif
INSTALL_DATA_HOOKS += install-data-hook-bashcomp-runuser
endif

if BUILD_UTMPDUMP
dist_bashcompletion_DATA += bash-completion/utmpdump
endif
if BUILD_LIBUUID
dist_bashcompletion_DATA += bash-completion/uuidgen
endif
if BUILD_UUIDPARSE
dist_bashcompletion_DATA += bash-completion/uuidparse
endif
if BUILD_UUIDD
dist_bashcompletion_DATA += bash-completion/uuidd
endif
if BUILD_LSBLK
dist_bashcompletion_DATA += bash-completion/lsblk
endif
if BUILD_LSLOCKS
dist_bashcompletion_DATA += bash-completion/lslocks
endif
if BUILD_RENAME
dist_bashcompletion_DATA += bash-completion/rename
endif
if BUILD_CHRT
dist_bashcompletion_DATA += bash-completion/chrt
endif
if BUILD_IONICE
dist_bashcompletion_DATA += bash-completion/ionice
endif
if BUILD_TASKSET
dist_bashcompletion_DATA += bash-completion/taskset
endif

if BUILD_CHCPU
dist_bashcompletion_DATA += bash-completion/chcpu
endif
if BUILD_CHMEM
dist_bashcompletion_DATA += bash-completion/chmem
endif
if BUILD_EJECT
dist_bashcompletion_DATA += bash-completion/eject
endif
if BUILD_FALLOCATE
dist_bashcompletion_DATA += bash-completion/fallocate
endif
if BUILD_HWCLOCK
dist_bashcompletion_DATA += bash-completion/hwclock
endif
if BUILD_TUNELP
dist_bashcompletion_DATA += bash-completion/tunelp
endif
if BUILD_LSCPU
dist_bashcompletion_DATA += bash-completion/lscpu
endif
if BUILD_LSMEM
dist_bashcompletion_DATA += bash-completion/lsmem
endif
if BUILD_LOSETUP
dist_bashcompletion_DATA += bash-completion/losetup
endif
if BUILD_MOUNT
dist_bashcompletion_DATA += bash-completion/mount
dist_bashcompletion_DATA += bash-completion/umount
endif
if BUILD_MOUNTPOINT
dist_bashcompletion_DATA += bash-completion/mountpoint
endif
if BUILD_NSENTER
dist_bashcompletion_DATA += bash-completion/nsenter
endif
if BUILD_PIVOT_ROOT
dist_bashcompletion_DATA += bash-completion/pivot_root
endif
if BUILD_SETPRIV
dist_bashcompletion_DATA += bash-completion/setpriv
endif
if BUILD_SWAPON
dist_bashcompletion_DATA += bash-completion/swapon
dist_bashcompletion_DATA += bash-completion/swapoff
endif
if BUILD_UNSHARE
dist_bashcompletion_DATA += bash-completion/unshare
endif
if BUILD_WDCTL
dist_bashcompletion_DATA += bash-completion/wdctl
endif
if BUILD_BLKDISCARD
dist_bashcompletion_DATA += bash-completion/blkdiscard
endif
if BUILD_BLKZONE
dist_bashcompletion_DATA += bash-completion/blkzone
endif
if BUILD_CTRLALTDEL
dist_bashcompletion_DATA += bash-completion/ctrlaltdel
endif
if BUILD_DMESG
dist_bashcompletion_DATA += bash-completion/dmesg
endif
if BUILD_FSFREEZE
dist_bashcompletion_DATA += bash-completion/fsfreeze
endif
if BUILD_FSTRIM
dist_bashcompletion_DATA += bash-completion/fstrim
endif
if BUILD_LDATTACH
dist_bashcompletion_DATA += bash-completion/ldattach
endif
if BUILD_RFKILL
dist_bashcompletion_DATA += bash-completion/rfkill
endif
if BUILD_RTCWAKE
dist_bashcompletion_DATA += bash-completion/rtcwake
endif
if BUILD_SETARCH
dist_bashcompletion_DATA += bash-completion/setarch
endif
if BUILD_ZRAMCTL
dist_bashcompletion_DATA += bash-completion/zramctl
endif

if BUILD_MESG
dist_bashcompletion_DATA += bash-completion/mesg
endif
if BUILD_WALL
dist_bashcompletion_DATA += bash-completion/wall
endif
if BUILD_WRITE
dist_bashcompletion_DATA += bash-completion/write
endif
if BUILD_SETTERM
dist_bashcompletion_DATA += bash-completion/setterm
endif

if BUILD_MORE
dist_bashcompletion_DATA += bash-completion/more
endif
if BUILD_PG
dist_bashcompletion_DATA += bash-completion/pg
endif
if BUILD_UL
dist_bashcompletion_DATA += bash-completion/ul
endif

endif # BUILD_BASH_COMPLETION
