Commit 85ec51fc authored by Dominik Taborsky's avatar Dominik Taborsky
Browse files

makefile: install bash completion script for keymgr to correct location.

parent 6850fe45
......@@ -40,6 +40,10 @@ AC_SUBST([libzscanner_VERSION_INFO],["-version-info 0:1:0"])
release_date=$(sed -n 's/^Knot DNS .* (\(.*\))/\1/p;q;' ${srcdir}/NEWS)
AC_SUBST([RELEASE_DATE], $release_date)
# Get Bash completion scripts directory
bash_completion_dir=$(pkg-config --variable=completionsdir bash-completion)
AC_SUBST([BASH_COMPLETION_DIR], $bash_completion_dir)
  • This is wrong.

    You are calling pkg-config before you know it's there. You also have no idea whether the bash-completion module is available. You need to enclose this code in PKG_CHECK_MODULES([BASH_COMPLETION],[bash-completion],[],[])

    Next you need to add automake conditional that will define HAVE_BASH_COMPLETION (search for other AM_CONDITIONAL([HAVE_... in and enclose the install block inside if HAVE_BASH_COMPLETION (see src/ for if/endif examples).

Please register or sign in to reply
# Set compiler compatibility flags
......@@ -24,9 +24,9 @@ install-data-local: knot.sample.conf
$(INSTALL) -d $(DESTDIR)/$(config_dir); \
$(INSTALL_DATA) knot.sample.conf $(srcdir)/ $(DESTDIR)/$(config_dir); \
if [ \! -f $(DESTDIR)/$(sysconfdir)/bash_completion.d/keymgr ]; then \
$(INSTALL) -d $(DESTDIR)/$(sysconfdir)/bash_completion.d; \
$(INSTALL_DATA) $(srcdir)/ $(DESTDIR)/$(sysconfdir)/bash_completion.d/keymgr; \
if [ \! -f $(BASH_COMPLETION_DIR)/keymgr ]; then \
$(INSTALL_DATA) $(srcdir)/ $(BASH_COMPLETION_DIR)/keymgr; \
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