Commit 72d41054 authored by Ondřej Surý's avatar Ondřej Surý

Always install bash completions into the directory provided by pkg-config (and...

Always install bash completions into the directory provided by pkg-config (and get rid of the extra variable)
parent d8860ba1
......@@ -67,9 +67,7 @@ AC_CONFIG_FILES([src/libknot.pc
# Get Bash completion scripts directory
bash_completion_dir=""
PKG_CHECK_VAR([bash_completion_dir], [bash-completion], [completionsdir],[
PKG_CHECK_VAR([bash_completion_prefix], [bash-completion], [prefix], [
AC_SUBST([BASH_COMPLETION_DIR], ['${prefix}'$(echo "$bash_completion_dir" | $SED -e "s,^$bash_completion_prefix,,")])
])],[:])
AC_SUBST([bash_completion_dir],[$bash_completion_dir])],[:])
AM_CONDITIONAL([HAVE_BASH_COMPLETION], [test -n "$bash_completion_dir"])
# Build Knot DNS daemon
......
......@@ -25,9 +25,9 @@ install-data-local: knot.sample.conf
$(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir); \
fi
if HAVE_BASH_COMPLETION
if [ \! -f $(DESTDIR)/$(BASH_COMPLETION_DIR)/keymgr ]; then \
$(INSTALL) -d $(DESTDIR)/$(BASH_COMPLETION_DIR); \
$(INSTALL_DATA) $(srcdir)/keymgr-completion.sh $(DESTDIR)/$(BASH_COMPLETION_DIR)/keymgr; \
if [ \! -f $(DESTDIR)/$(bash_completion_dir)/keymgr ]; then \
$(INSTALL) -d $(DESTDIR)/$(bash_completion_dir); \
$(INSTALL_DATA) $(srcdir)/keymgr-completion.sh $(DESTDIR)/$(bash_completion_dir)/keymgr; \
fi
endif # HAVE_BASH_COMPLETION
......@@ -35,7 +35,7 @@ uninstall-local:
-rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \
$(DESTDIR)/$(config_dir)/example.com.zone
if HAVE_BASH_COMPLETION
-rm -rf $(DESTDIR)/$(BASH_COMPLETION_DIR)/keymgr
-rm -rf $(DESTDIR)/$(bash_completion_dir)/keymgr
endif # HAVE_BASH_COMPLETION
endif # HAVE_DAEMON
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment