Commit 8a886f99 authored by Dominik Taborsky's avatar Dominik Taborsky

makefile: fix previous attempt at installing bash completion script correctly.

parent 85ec51fc
...@@ -40,10 +40,6 @@ AC_SUBST([libzscanner_VERSION_INFO],["-version-info 0:1:0"]) ...@@ -40,10 +40,6 @@ AC_SUBST([libzscanner_VERSION_INFO],["-version-info 0:1:0"])
release_date=$(sed -n 's/^Knot DNS .* (\(.*\))/\1/p;q;' ${srcdir}/NEWS) release_date=$(sed -n 's/^Knot DNS .* (\(.*\))/\1/p;q;' ${srcdir}/NEWS)
AC_SUBST([RELEASE_DATE], $release_date) 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)
# Set compiler compatibility flags # Set compiler compatibility flags
AC_PROG_CC_C99 AC_PROG_CC_C99
AM_PROG_CC_C_O AM_PROG_CC_C_O
...@@ -114,6 +110,14 @@ PKG_CHECK_MODULES([gnutls], [gnutls >= 3.0 nettle]) ...@@ -114,6 +110,14 @@ PKG_CHECK_MODULES([gnutls], [gnutls >= 3.0 nettle])
# JSON for DNSSEC status storage # JSON for DNSSEC status storage
PKG_CHECK_MODULES([jansson], [jansson >= 2.3]) PKG_CHECK_MODULES([jansson], [jansson >= 2.3])
# Get Bash completion scripts directory
bash_completion_dir=""
PKG_CHECK_MODULES([bash_completion],[bash-completion],[
bash_completion_dir=$(pkg-config --variable=completionsdir bash-completion)
AC_SUBST([BASH_COMPLETION_DIR], $bash_completion_dir)
])
AM_CONDITIONAL([HAVE_BASH_COMPLETION], test -n "$bash_completion_dir")
# Debug modules # Debug modules
AC_ARG_ENABLE([debug], AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug=server,zones,ns,loader,dnssec], AS_HELP_STRING([--enable-debug=server,zones,ns,loader,dnssec],
......
...@@ -24,10 +24,12 @@ install-data-local: knot.sample.conf ...@@ -24,10 +24,12 @@ install-data-local: knot.sample.conf
$(INSTALL) -d $(DESTDIR)/$(config_dir); \ $(INSTALL) -d $(DESTDIR)/$(config_dir); \
$(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir); \ $(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir); \
fi fi
if HAVE_BASH_COMPLETION
if [ \! -f $(BASH_COMPLETION_DIR)/keymgr ]; then \ if [ \! -f $(BASH_COMPLETION_DIR)/keymgr ]; then \
$(INSTALL) -d $(BASH_COMPLETION_DIR); \ $(INSTALL) -d $(BASH_COMPLETION_DIR); \
$(INSTALL_DATA) $(srcdir)/keymgr-completion.sh $(BASH_COMPLETION_DIR)/keymgr; \ $(INSTALL_DATA) $(srcdir)/keymgr-completion.sh $(BASH_COMPLETION_DIR)/keymgr; \
fi fi
endif # HAVE_BASH_COMPLETION
uninstall-local: uninstall-local:
-rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \ -rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \
......
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