From: Nathan Schulte Date: Sat, 12 Aug 2017 03:51:59 +0000 (-0500) Subject: use pkg-config for bash-completion completions dir X-Git-Tag: 1.2~10^2~1 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=5ec2d52568d609f8a5e38999b1de05b4d96bde46 use pkg-config for bash-completion completions dir --- diff --git a/Makefile b/Makefile index 1af39a3..ee4f94e 100644 --- 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