mirror of
https://codeberg.org/cage/tinmop/
synced 2024-12-19 23:33:03 +01:00
- used autotools to install bash completion script.
This commit is contained in:
parent
6052f7da24
commit
5a0757e365
@ -40,6 +40,11 @@ doc/tinmop.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
|
||||
confdir = $(sysconfdir)/$(PACKAGE)
|
||||
|
||||
if ENABLE_COMPLETION
|
||||
completiondir = $(COMPLETION_DIR)
|
||||
dist_completion_DATA = data/completion/tinmop
|
||||
endif
|
||||
|
||||
dist_conf_DATA = etc/init.lisp etc/default-theme.conf etc/shared.conf etc/shared-gui.conf
|
||||
|
||||
nobase_dist_pkgdata_DATA = \
|
||||
|
72
Makefile.in
72
Makefile.in
@ -116,8 +116,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(dist_conf_DATA) $(dist_doc_DATA) \
|
||||
$(nobase_dist_pkgdata_DATA) $(am__DIST_COMMON)
|
||||
$(am__configure_deps) $(am__dist_completion_DATA_DIST) \
|
||||
$(dist_conf_DATA) $(dist_doc_DATA) $(nobase_dist_pkgdata_DATA) \
|
||||
$(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
@ -151,8 +152,8 @@ am__uninstall_files_from_dir = { \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
|
||||
"$(DESTDIR)$(confdir)" "$(DESTDIR)$(docdir)" \
|
||||
"$(DESTDIR)$(pkgdatadir)"
|
||||
"$(DESTDIR)$(completiondir)" "$(DESTDIR)$(confdir)" \
|
||||
"$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)"
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
@ -184,7 +185,9 @@ am__can_run_installinfo = \
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(dist_man1_MANS)
|
||||
DATA = $(dist_conf_DATA) $(dist_doc_DATA) $(nobase_dist_pkgdata_DATA)
|
||||
am__dist_completion_DATA_DIST = data/completion/tinmop
|
||||
DATA = $(dist_completion_DATA) $(dist_conf_DATA) $(dist_doc_DATA) \
|
||||
$(nobase_dist_pkgdata_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
@ -271,6 +274,7 @@ CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHMOD = @CHMOD@
|
||||
COMPLETION_DIR = @COMPLETION_DIR@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
@ -327,6 +331,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POSUB = @POSUB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@ -406,6 +411,8 @@ dist_doc_DATA = README.org LICENSES.org CONTRIBUTING.org \
|
||||
doc/tinmop.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
|
||||
confdir = $(sysconfdir)/$(PACKAGE)
|
||||
@ENABLE_COMPLETION_TRUE@completiondir = $(COMPLETION_DIR)
|
||||
@ENABLE_COMPLETION_TRUE@dist_completion_DATA = data/completion/tinmop
|
||||
dist_conf_DATA = etc/init.lisp etc/default-theme.conf etc/shared.conf etc/shared-gui.conf
|
||||
nobase_dist_pkgdata_DATA = \
|
||||
data/error-pages/51 \
|
||||
@ -569,6 +576,27 @@ uninstall-man1:
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||
install-dist_completionDATA: $(dist_completion_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(dist_completion_DATA)'; test -n "$(completiondir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(completiondir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(completiondir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(completiondir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(completiondir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_completionDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_completion_DATA)'; test -n "$(completiondir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(completiondir)'; $(am__uninstall_files_from_dir)
|
||||
install-dist_confDATA: $(dist_conf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(dist_conf_DATA)'; test -n "$(confdir)" || list=; \
|
||||
@ -947,7 +975,7 @@ check: $(BUILT_SOURCES)
|
||||
all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(confdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(completiondir)" "$(DESTDIR)$(confdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: $(BUILT_SOURCES)
|
||||
@ -1005,8 +1033,9 @@ info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_confDATA install-dist_docDATA \
|
||||
install-man install-nobase_dist_pkgdataDATA
|
||||
install-data-am: install-dist_completionDATA install-dist_confDATA \
|
||||
install-dist_docDATA install-man \
|
||||
install-nobase_dist_pkgdataDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
@ -1052,8 +1081,8 @@ ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-dist_confDATA \
|
||||
uninstall-dist_docDATA uninstall-man \
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-dist_completionDATA \
|
||||
uninstall-dist_confDATA uninstall-dist_docDATA uninstall-man \
|
||||
uninstall-nobase_dist_pkgdataDATA
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
@ -1069,17 +1098,18 @@ uninstall-man: uninstall-man1
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binSCRIPTS install-data install-data-am \
|
||||
install-dist_confDATA install-dist_docDATA install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man1 install-nobase_dist_pkgdataDATA 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 uninstall-binSCRIPTS uninstall-dist_confDATA \
|
||||
uninstall-dist_docDATA uninstall-man uninstall-man1 \
|
||||
uninstall-nobase_dist_pkgdataDATA
|
||||
install-dist_completionDATA install-dist_confDATA \
|
||||
install-dist_docDATA install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-man1 \
|
||||
install-nobase_dist_pkgdataDATA 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 \
|
||||
uninstall-binSCRIPTS uninstall-dist_completionDATA \
|
||||
uninstall-dist_confDATA uninstall-dist_docDATA uninstall-man \
|
||||
uninstall-man1 uninstall-nobase_dist_pkgdataDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
75
configure
vendored
75
configure
vendored
@ -621,6 +621,10 @@ ac_subst_vars='am__EXEEXT_FALSE
|
||||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
ENABLE_COMPLETION_FALSE
|
||||
ENABLE_COMPLETION_TRUE
|
||||
COMPLETION_DIR
|
||||
PKG_CONFIG
|
||||
FILE
|
||||
MONTAGE
|
||||
DIRNAME
|
||||
@ -7743,6 +7747,73 @@ printf "%s\n" "$as_me: WARNING: Can not find 'file' executable." >&2;}
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
for ac_prog in pkg-config
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
printf %s "checking for $ac_word... " >&6; }
|
||||
if test ${ac_cv_path_PKG_CONFIG+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
case $PKG_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
case $as_dir in #(((
|
||||
'') as_dir=./ ;;
|
||||
*/) ;;
|
||||
*) as_dir=$as_dir/ ;;
|
||||
esac
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
||||
printf "%s\n" "$PKG_CONFIG" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$PKG_CONFIG" && break
|
||||
done
|
||||
test -n "$PKG_CONFIG" || PKG_CONFIG="no"
|
||||
|
||||
|
||||
COMPLETION_DIR=""
|
||||
if test "$PKG_CONFIG" != "no" ; then
|
||||
COMPLETION_DIR=`pkg-config --variable=completionsdir bash-completion`
|
||||
|
||||
fi
|
||||
|
||||
if test "$COMPLETION_DIR" != ""; then
|
||||
ENABLE_COMPLETION_TRUE=
|
||||
ENABLE_COMPLETION_FALSE='#'
|
||||
else
|
||||
ENABLE_COMPLETION_TRUE='#'
|
||||
ENABLE_COMPLETION_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -8056,6 +8127,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
|
||||
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${ENABLE_COMPLETION_TRUE}" && test -z "${ENABLE_COMPLETION_FALSE}"; then
|
||||
as_fn_error $? "conditional \"ENABLE_COMPLETION\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
|
||||
: "${CONFIG_STATUS=./config.status}"
|
||||
ac_write_fail=0
|
||||
|
10
configure.ac
10
configure.ac
@ -137,6 +137,16 @@ if test "$FILE" = "no" ; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
AC_PATH_PROGS([PKG_CONFIG],[pkg-config],[no])
|
||||
|
||||
COMPLETION_DIR=""
|
||||
if test "$PKG_CONFIG" != "no" ; then
|
||||
COMPLETION_DIR=`pkg-config --variable=completionsdir bash-completion`
|
||||
AC_SUBST([COMPLETION_DIR])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_COMPLETION],[test "$COMPLETION_DIR" != ""])
|
||||
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
dnl checks for libraries
|
||||
|
9
data/completion/tinmop
Normal file
9
data/completion/tinmop
Normal file
@ -0,0 +1,9 @@
|
||||
#/usr/bin/env bash
|
||||
_tinmop_completions() {
|
||||
COMPREPLY=($(COMP_WORDS="${COMP_WORDS[*]}" \
|
||||
COMP_CWORD=$COMP_CWORD \
|
||||
COMP_LINE=$COMP_LINE \
|
||||
tinmop --bash-complete))
|
||||
}
|
||||
|
||||
complete -F _tinmop_completions tinmop
|
Loading…
Reference in New Issue
Block a user