Skip to content

Commit e294304

Browse files
authored
Merge pull request #155 from tokuchan/pull-request--fix-prefix-issue-in-Makefile
fix(Makefile): Make bash completion honor PREFIX
2 parents fe2fdb1 + e59ca8b commit e294304

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ test/victim: override LDFLAGS := $(VICTIM_LDFLAGS)
4141
clean:
4242
rm -f reptyr $(OBJS) test/victim.o test/victim $(DEPS)
4343

44-
BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null)
44+
BASHCOMPDIR ?= $PREFIX/share/bash-completion/completions/
4545

4646
install: reptyr
4747
install -d -m 755 $(DESTDIR)$(BINDIR)
@@ -50,10 +50,8 @@ install: reptyr
5050
install -m 644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1
5151
install -d -m 755 $(DESTDIR)$(MANDIR)/fr/man1
5252
install -m 644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1
53-
bashcompdir=$(BASHCOMPDIR) ; \
54-
test -z "$$bashcompdir" && bashcompdir=/etc/bash_completion.d ; \
55-
install -d -m 755 $(DESTDIR)$$bashcompdir ; \
56-
install -m 644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr
53+
install -d -m 755 $(DESTDIR)$(BASHCOMPDIR) ; \
54+
install -m 644 reptyr.bash $(DESTDIR)$(BASHCOMPDIR)/reptyr
5755

5856
.PHONY: PHONY
5957

0 commit comments

Comments
 (0)