aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:40:13 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:40:13 +1300
commit85dc6dd47f279aafd69b93aec91cf209c42e7aa7 (patch)
treeb294b685ecc306bb9876c1f3c6968e6e3081642f
parent7fb468b76d0a503897f492a98e9b9f7f238c6a50 (diff)
downloadwatch-vcs-tags-85dc6dd47f279aafd69b93aec91cf209c42e7aa7.tar.gz
Refactor Makefile for more generality
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index acf1ab8..8801108 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
.POSIX:
.SUFFIXES:
-.PHONY: all install clean
+.SUFFIXES: .sh
+.PHONY: all install install-bin install-man clean
PREFIX = /usr/local
ALL = watch-git-tags
-all: $(ALL)
-watch-git-tags: watch-git-tags.sh
- command -pv sh | sed 's_^_#!_' > $@
- cat watch-git-tags.sh >> $@
+SH = /bin/sh
+.sh:
+ { printf '#!%s\n\n' $(SH) ; cat $< ; } > $@
chmod +x ./$@
+all: $(ALL)
install: install-bin install-man
install-bin:
mkdir -p -- $(PREFIX)/bin