From e59ca8bc2b391a0c1113fdee0498d75bcc598f57 Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Tue, 14 Jan 2025 16:16:56 -0800 Subject: [PATCH] Stop using pkg-config to get the bash completion dir Per [the bash_completion documentation](https://github.com/scop/bash-completion/blob/main/README.md), this is the preferred style as of new versions. It's also generally much simpler and more consistent with other options, so let's see if we can just switch over. --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6de8c2b..1e0e5fc 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ test/victim: override LDFLAGS := $(VICTIM_LDFLAGS) clean: rm -f reptyr $(OBJS) test/victim.o test/victim $(DEPS) -BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null | sed -e 's,/usr,$(PREFIX),') +BASHCOMPDIR ?= $PREFIX/share/bash-completion/completions/ install: reptyr install -d -m 755 $(DESTDIR)$(BINDIR) @@ -50,10 +50,8 @@ install: reptyr install -m 644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1 install -d -m 755 $(DESTDIR)$(MANDIR)/fr/man1 install -m 644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1 - bashcompdir=$(BASHCOMPDIR) ; \ - test -z "$$bashcompdir" && bashcompdir=/etc/bash_completion.d ; \ - install -d -m 755 $(DESTDIR)$$bashcompdir ; \ - install -m 644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr + install -d -m 755 $(DESTDIR)$(BASHCOMPDIR) ; \ + install -m 644 reptyr.bash $(DESTDIR)$(BASHCOMPDIR)/reptyr .PHONY: PHONY