aboutsummaryrefslogtreecommitdiffgithub
path: root/Makefile
diff options
context:
space:
mode:
authorAustin Adams <git@austinjadams.com>2015-09-12 18:19:58 -0400
committerAustin Adams <git@austinjadams.com>2015-09-12 18:19:58 -0400
commita197cbce85fc23383ea94c5245df7a5147492617 (patch)
tree87753b66c3266dfda102d031fbb15da8612248a7 /Makefile
parentde522bea76293ac3ad149ef2e0dd6a70fbaa2e04 (diff)
downloadnsdo-a197cbce85fc23383ea94c5245df7a5147492617.tar.gz
nsdo-a197cbce85fc23383ea94c5245df7a5147492617.tar.xz
add bash completion, tweak makefile
also fixed a type in the manpage
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 390723a..7705b6e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
CFLAGS ?= -Wall -Werror -O3
+# if you're building a system package, you should probably set these to
+# /usr, /usr/share/bash-completion/completions, and your package dir
PREFIX ?= /usr/local
+BASH_COMPLETION_DIR ?= /etc/bash_completion.d
+DESTDIR ?=
PROG = nsdo
MANSECTION = 1
@@ -12,14 +16,15 @@ README = README.md
all: $(PROG) $(MANPAGEGZ) $(README)
install: $(PROG) $(MANPAGEGZ)
- install -Dm6755 $< $(PREFIX)/bin/$<
- install -Dm644 $(word 2,$^) $(PREFIX)/share/man/man$(MANSECTION)/$(word 2,$^)
+ install -Dm4755 $< $(DESTDIR)$(PREFIX)/bin/$<
+ install -Dm644 $(word 2,$^) $(DESTDIR)$(PREFIX)/share/man/man$(MANSECTION)/$(word 2,$^)
+ install -Dm644 bash_completion/$(PROG) $(DESTDIR)$(BASH_COMPLETION_DIR)/$(PROG)
clean:
rm -fv $(PROG) $(MANPAGEGZ) $(README)
$(MANPAGEGZ): $(MANPAGE)
- gzip --best -k $<
+ gzip --best -f -k $<
$(README): readme.head $(MANPAGE)
{ \