From 5ec2d52568d609f8a5e38999b1de05b4d96bde46 Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Fri, 11 Aug 2017 22:51:59 -0500 Subject: [PATCH] use pkg-config for bash-completion completions dir --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.2