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

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 configure.ac) and enclose the install block inside if HAVE_BASH_COMPLETION (see src/Makefile.am for if/endif examples).

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