aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-14 03:56:45 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-14 03:56:45 +0100
commitdff534442f16edb08b9a01a9bb01b6d7baf01911 (patch)
treed4f6c5de7c276de1255440acfaced7d03df4972c /Makefile
parenttypo (diff)
downloadsha3sum-dff534442f16edb08b9a01a9bb01b6d7baf01911.tar.gz
sha3sum-dff534442f16edb08b9a01a9bb01b6d7baf01911.tar.bz2
sha3sum-dff534442f16edb08b9a01a9bb01b6d7baf01911.tar.xz
add tab-completion in shell
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile34
1 files changed, 33 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 364f3c0..7d37b36 100644
--- a/Makefile
+++ b/Makefile
@@ -29,9 +29,15 @@ CMDS = keccak-224sum keccak-256sum keccak-384sum keccak-512sum keccaksum \
+.PHONY: default
+default: command shell
+
.PHONY: all
-all: $(foreach C,$(CMDS),bin/$(C))
+all: command shell
+
+.PHONY: command
+commands: $(foreach C,$(CMDS),bin/$(C))
bin/%: obj/%.o obj/common.o
@mkdir -p bin
@@ -42,6 +48,32 @@ obj/%.o: src/%.c src/*.h
$(CC) $(FLAGS) $(COPTIMISE) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+.PHONY: shell
+shell: bash zsh fish
+
+.PHONY: bash
+bash: $(foreach C,$(CMDS),bin/$(C).bash)
+
+.PHONY: zsh
+zsh: $(foreach C,$(CMDS),bin/$(C).zsh)
+
+.PHONY: fish
+fish: $(foreach C,$(CMDS),bin/$(C).fish)
+
+bin/%.bash: src/completion
+ @mkdir -p bin
+ auto-auto-complete bash --output $@ --source $< command=$*
+
+bin/%.zsh: src/completion
+ @mkdir -p bin
+ auto-auto-complete zsh --output $@ --source $< command=$*
+
+bin/%.fish: src/completion
+ @mkdir -p bin
+ auto-auto-complete fish --output $@ --source $< command=$*
+
+
+
.PHONY: clean
clean:
-rm -r bin obj