summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index abd6a79..c9e7755 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,22 @@
PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
+MANDIR ?= ${PREFIX}/share/man
-install:tcvt.py optcvt.sh.transformed
+install:build
+ install -d "${DESTDIR}${BINDIR}"
+ install -d "${DESTDIR}${MANDIR}/man1"
install -m755 tcvt.py "${DESTDIR}${BINDIR}/tcvt"
install -m755 optcvt.sh.transformed "${DESTDIR}${BINDIR}/optcvt"
-build:optcvt.sh.transformed
+ install -m644 tcvt.1.gz "${DESTDIR}${MANDIR}/man1/tcvt.1.gz"
+ ln -s tcvt.1.gz "${DESTDIR}${MANDIR}/man1/optcvt.1.gz"
+build:optcvt.sh.transformed tcvt.1.gz
clean:
- rm -f optcvt.sh.transformed
+ rm -f optcvt.sh.transformed tcvt.1.gz
optcvt.sh.transformed:optcvt.sh
sed 's!^TCVT=.*!TCVT="${BINDIR}/tcvt"!' < $< > $@
+%.gz:%
+ gzip -9 < $< > $@
+
.PHONY:build install clean