2018-01-21 14:39:26 +00:00
|
|
|
PREFIX ?= /usr/local
|
2018-01-20 05:16:25 +00:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
2018-03-03 23:24:05 +00:00
|
|
|
ifneq ($(wildcard /etc/bash_completion.d/.),)
|
|
|
|
CPLDIR ?= /etc/bash_completion.d
|
|
|
|
else
|
|
|
|
ifneq ($(shell command -v pkg-config 2> /dev/null))
|
|
|
|
CPLDIR ?= $$(pkg-config --variable=completionsdir bash-completion)
|
|
|
|
endif
|
|
|
|
endif
|
2018-01-20 05:16:25 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
@echo Installing the executable to $(DESTDIR)$(BINDIR)
|
2018-01-20 20:02:34 +00:00
|
|
|
@mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
|
@cp -f burrow $(DESTDIR)$(BINDIR)/burrow
|
|
|
|
@chmod 755 $(DESTDIR)$(BINDIR)/burrow
|
2018-01-20 05:16:25 +00:00
|
|
|
@echo Installing the manual page to $(DESTDIR)$(MANDIR)/man1
|
2018-01-20 20:02:34 +00:00
|
|
|
@mkdir -p $(DESTDIR)$(MANDIR)
|
2018-01-20 05:16:25 +00:00
|
|
|
@cp -f burrow.1 $(DESTDIR)$(MANDIR)/man1/burrow.1
|
2018-01-20 20:02:34 +00:00
|
|
|
@chmod 644 $(DESTDIR)$(MANDIR)/man1/burrow.1
|
|
|
|
@echo Installing the command completion to $(DESTDIR)$(CPLDIR)
|
2018-01-20 20:20:25 +00:00
|
|
|
@cp -f burrow.d $(DESTDIR)$(CPLDIR)/burrow
|
|
|
|
@chmod 644 $(DESTDIR)$(CPLDIR)/burrow
|
2018-01-20 05:16:25 +00:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
@echo Removing the executable from $(DESTDIR)$(BINDIR)
|
|
|
|
@rm -f $(DESTDIR)$(BINDIR)/burrow
|
|
|
|
@echo Removing the manual page from $(DESTDIR)$(MANDIR)/man1
|
|
|
|
@rm -f $(DESTDIR)$(BINDIR)/man1/burrow.1
|
2018-01-20 20:02:34 +00:00
|
|
|
@echo Removing the command completion from $(DESTDIR)$(CPLDIR)
|
2018-01-20 20:20:25 +00:00
|
|
|
@rm -f $(DESTDIR)$(CPLDIR)/burrow
|
2018-01-20 05:16:25 +00:00
|
|
|
|
|
|
|
.PHONY: install uninstall
|