Commit 6926e562 authored by Dominik Taborsky's avatar Dominik Taborsky

makefile: put DESTDIR back, fix make uninstall.

parent 55686c75
......@@ -65,7 +65,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_dir], [bash-completionXXX],[completionsdir],[
AC_SUBST([BASH_COMPLETION_DIR], [$bash_completion_dir])
],[:])
AM_CONDITIONAL([HAVE_BASH_COMPLETION], [test -n "$bash_completion_dir"])
......
......@@ -25,16 +25,18 @@ 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 $(BASH_COMPLETION_DIR)/keymgr ]; then \
$(INSTALL) -d $(BASH_COMPLETION_DIR); \
$(INSTALL_DATA) $(srcdir)/keymgr-completion.sh $(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
uninstall-local:
-rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \
$(DESTDIR)/$(config_dir)/example.com.zone \
$(DESTDIR)/$(sysconfdir)/bash_completion.d/keymgr
$(DESTDIR)/$(config_dir)/example.com.zone
if HAVE_BASH_COMPLETION
-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