summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-22 00:24:42 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-22 00:24:42 +0100
commit023d9d12f26f1a8809f7307c61bbe9ff45cfbad6 (patch)
tree62a03a1e1daab8976407046f2e9ed9739d8e4d41 /Makefile
parentm (diff)
downloadblueshift-023d9d12f26f1a8809f7307c61bbe9ff45cfbad6.tar.gz
blueshift-023d9d12f26f1a8809f7307c61bbe9ff45cfbad6.tar.bz2
blueshift-023d9d12f26f1a8809f7307c61bbe9ff45cfbad6.tar.xz
move completion into src and build its output scripts to bin
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 13 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 2e87f52..d261389 100644
--- a/Makefile
+++ b/Makefile
@@ -65,13 +65,13 @@ command: $(foreach C,$(CBINDINGS),bin/$(C)) bin/blueshift
shell: bash zsh fish
.PHONY: bash
-bash: blueshift.bash
+bash: bin/blueshift.bash
.PHONY: zsh
-zsh: blueshift.zsh
+zsh: bin/blueshift.zsh
.PHONY: fish
-fish: blueshift.fish
+fish: bin/blueshift.fish
bin/blueshift: obj/blueshift.zip
@@ -126,13 +126,16 @@ obj/%.c: src/%.pyx
mv obj/$@ $@
-blueshift.bash: completion
+bin/blueshift.bash: src/completion
+ @mkdir -p bin
auto-auto-complete bash --output $@ --source $<
-blueshift.zsh: completion
+bin/blueshift.zsh: src/completion
+ @mkdir -p bin
auto-auto-complete zsh --output $@ --source $<
-blueshift.fish: completion
+bin/blueshift.fish: src/completion
+ @mkdir -p bin
auto-auto-complete fish --output $@ --source $<
@@ -192,17 +195,17 @@ install-dvi: blueshift.dvi
install-shell: install-bash install-zsh install-fish
.PHONY: install-bash
-install-bash: blueshift.bash
+install-bash: bin/blueshift.bash
install -dm755 -- "$(DESTDIR)$(DATADIR)/bash-completion/completions"
install -m644 $< -- "$(DESTDIR)$(DATADIR)/bash-completion/completions/$(COMMAND)"
.PHONY: install-zsh
-install-zsh: blueshift.zsh
+install-zsh: bin/blueshift.zsh
install -dm755 -- "$(DESTDIR)$(DATADIR)/zsh/site-functions"
install -m644 $< -- "$(DESTDIR)$(DATADIR)/zsh/site-functions/_$(COMMAND)"
.PHONY: install-fish
-install-fish: blueshift.fish
+install-fish: bin/blueshift.fish
install -dm755 -- "$(DESTDIR)$(DATADIR)/fish/completions"
install -m644 $< -- "$(DESTDIR)$(DATADIR)/fish/completions/$(COMMAND).fish"
@@ -236,5 +239,5 @@ uninstall:
.PHONY: all
clean:
- -rm -r bin obj src/blueshift_randr.c src/blueshift_vidmode.c blueshift.{ba,z,fi}sh
+ -rm -r bin obj src/blueshift_randr.c src/blueshift_vidmode.c