@ -1,6 +1,6 @@
PREFIX ?= /usr/local
BINDIR ?= $( PREFIX) /bin
MANDIR ?= $( PREFIX) /share/man
MANDIR ?= $( PREFIX) /share/man/man1
# Attempt to find bash completion dir in order of preference
i f n e q ( $( wildcard /etc /bash_completion .d /.) , )
@ -14,23 +14,22 @@ endif
HAS_PKGCONFIG := $( shell command -v pkg-config 2> /dev/null)
i f d e f H A S _ P K G C O N F I G
CPLDIR ?= $$ ( pkg-config --variable= completionsdir bash-completion 2> /dev/null )
CPLDIR ?= $( shell pkg-config --variable= completionsdir bash-completion 2> /dev/null )
e n d i f
install :
@echo Installing the executable to $( BINDIR)
@mkdir -p $( BINDIR)
@cp -f burrow $( BINDIR) /burrow
@chmod 755 $( BINDIR) /burrow
@install -m 755 burrow $( BINDIR)
@echo Installing the manual page to $( MANDIR) /man1
@mkdir -p $( MANDIR)
@cp -f burrow.1 $( MANDIR) /man1/burrow.1
@chmod 644 $( MANDIR) /man1/burrow.1
@install -m 644 burrow.1 $( MANDIR)
i f d e f C P L D I R
i f n e q ( $( CPLDIR ) , )
@echo Installing the command completion to $( CPLDIR)
@mkdir -p $( CPLDIR)
@cp -f burrow.d $( CPLDIR) /burrow
@chmod 644 $( CPLDIR) /burrow
@install -m 644 burrow.d $( CPLDIR) /burrow
e n d i f
e n d i f
uninstall :
@ -39,8 +38,10 @@ uninstall:
@echo Removing the manual page from $( MANDIR) /man1
@rm -f $( BINDIR) /man1/burrow.1
i f d e f C P L D I R
i f n e q ( $( CPLDIR ) , )
@echo Removing the command completion from $( CPLDIR)
@rm -f $( CPLDIR) /burrow
e n d i f
e n d i f
.PHONY : install uninstall