From 74124ed2492269704f5ae5023f9c7cf600bfe25c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 22 Feb 2014 05:37:22 +0100 Subject: update makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 15bbe3e..0163504 100644 --- a/Makefile +++ b/Makefile @@ -12,19 +12,35 @@ DATADIR ?= $(PREFIX)$(DATA) LICENSEDIR ?= $(DATADIR)/licenses LOCALEDIR ?= $(DATADIR)/locale -SHEBANG ?= /usr/bin/python2 +SHEBANG ?= /usr/bin/env python2 COMMAND ?= blueshift-tray PKGNAME ?= blueshift-tray .PHONY: all -all: bin/blueshift-tray +all: command shell +.PHONY: command +command: bin/blueshift-tray -bin/blueshift-tray: src/blueshift-tray +.PHONY: shell +shell: bash zsh fish + +.PHONY: bash +bash: bin/blueshift-tray.bash + +.PHONY: zsh +zsh: bin/blueshift-tray.zsh + +.PHONY: fish +fish: bin/blueshift-tray.fish + + +bin/blueshift-tray: src/blueshift-tray.py @mkdir -p bin cp $< $@ - sed -i '' $@ + sed -i '/^LOCALEDIR *= /s#^.*$$#LOCALEDIR = '\''$(LOCALEDIR)'\''#' $@ + sed -i 's:^#!/usr/bin/env python2$$:#!$(SHEBANG):' $@ bin/blueshift-tray.bash: src/completion @mkdir -p bin -- cgit v1.2.3-70-g09d2