Makefile: install bash+zsh completion files.

This commit is contained in:
Ole Tange 2022-05-30 22:24:08 +02:00
parent 2f85da8167
commit f1b4a279a5
3 changed files with 27 additions and 11 deletions

View file

@ -167,5 +167,12 @@ pack_unpack_and_test_build:
cd parallel-$(YYYYMMDD) && \
./configure && make -j && sudo make -j install
zshcompletion=${datarootdir}/zsh/site-functions/_parallel
install-data-hook:
parallel --shell-completion bash > ${datarootdir}/bash-completion/completions/parallel
echo '#compdef parallel' > ${zshcompletion}
echo '(( $$+functions[_comp_parallel] )) ||' >> ${zshcompletion}
echo ' eval "$$(parallel --shell-completion auto)" &&' >> ${zshcompletion}
echo ' _comp_parallel' >> ${zshcompletion}
EXTRA_DIST = CITATION CITATION.cff CREDITS LICENSES/CC-BY-SA-4.0.txt LICENSES/GFDL-1.3-or-later.txt LICENSES/GPL-3.0-or-later.txt

View file

@ -281,6 +281,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src
zshcompletion = ${datarootdir}/zsh/site-functions/_parallel
EXTRA_DIST = CITATION CITATION.cff CREDITS LICENSES/CC-BY-SA-4.0.txt LICENSES/GFDL-1.3-or-later.txt LICENSES/GPL-3.0-or-later.txt
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@ -694,7 +695,8 @@ info: info-recursive
info-am:
install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-recursive
install-dvi-am:
@ -741,7 +743,8 @@ ps-am:
uninstall-am:
.MAKE: $(am__recursive_targets) all install-am install-strip
.MAKE: $(am__recursive_targets) all install-am install-data-am \
install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
@ -750,14 +753,14 @@ uninstall-am:
dist-zstd distcheck distclean distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-am uninstall uninstall-am
.PRECIOUS: Makefile
@ -924,6 +927,12 @@ pack_unpack_and_test_build:
tar xjf parallel-$(YYYYMMDD).tar.bz2 && \
cd parallel-$(YYYYMMDD) && \
./configure && make -j && sudo make -j install
install-data-hook:
parallel --shell-completion bash > ${datarootdir}/bash-completion/completions/parallel
echo '#compdef parallel' > ${zshcompletion}
echo '(( $$+functions[_comp_parallel] )) ||' >> ${zshcompletion}
echo ' eval "$$(parallel --shell-completion auto)" &&' >> ${zshcompletion}
echo ' _comp_parallel' >> ${zshcompletion}
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -2654,7 +2654,7 @@ sub check_invalid_option_combinations() {
sub init_globals() {
# Defaults:
$Global::version = 20220522;
$Global::version = 20220530;
$Global::progname = 'parallel';
$::name = "GNU Parallel";
$Global::infinity = 2**31;