]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
use pkg-config for bash-completion completions dir
authorNathan Schulte <nmschulte@gmail.com>
Sat, 12 Aug 2017 03:51:59 +0000 (22:51 -0500)
committerNathan Schulte <nmschulte@gmail.com>
Sat, 12 Aug 2017 03:58:25 +0000 (22:58 -0500)
Makefile

index 1af39a34cd43ba8672b2309b29b0139d650921a4..ee4f94efec2e9dd16ed4b2941ff823a8ff978ad5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -35,9 +35,8 @@ uninstall_autorandr:
        rm -f ${DESTDIR}${PREFIX}/bin/autorandr
 
 # Rules for bash_completion
-BASH_COMPLETION_DIR=/etc/bash_completion.d
-HAVE_BASH_COMPLETION=$(shell [ -d /etc/bash_completion.d/ ] && echo "y")
-ifeq ($(HAVE_BASH_COMPLETION),y)
+BASH_COMPLETION_DIR:=$(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null)
+ifneq (,$(BASH_COMPLETION_DIR))
 DEFAULT_TARGETS+=bash_completion
 endif