diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-03 10:57:37 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-03 10:57:37 +0100 |
commit | 600af502aaedcc496ac3dc0771888de978f3e31c (patch) | |
tree | c5e496ea976bb602e232b55bfc664b16bb9fd049 /Makefile | |
parent | change license (diff) | |
download | krandom-600af502aaedcc496ac3dc0771888de978f3e31c.tar.gz krandom-600af502aaedcc496ac3dc0771888de978f3e31c.tar.bz2 krandom-600af502aaedcc496ac3dc0771888de978f3e31c.tar.xz |
add completion
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 27 insertions, 2 deletions
@@ -50,10 +50,10 @@ FLAGS = $(WARN) -std=gnu99 .PHONY: default -default: command +default: command shell .PHONY: all -all: command +all: command shell .PHONY: command @@ -68,6 +68,31 @@ obj/%.o: src/%.c $(CC) $(FLAGS) $(COPTIMISE) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) +.PHONY: shell +shell: bash zsh fish + +.PHONY: bash +bash: bin/$(COMMAND).bash + +.PHONY: zsh +zsh: bin/$(COMMAND).zsh + +.PHONY: fish +fish: bin/$(COMMAND).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: |