summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2021-11-11 20:47:52 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2021-11-11 17:13:48 +0100
commit33931c9c5380252c44d8510248bbb91f18fb26e7 (patch)
treecf2c30c05312de20edefe53f2f5b9b005c46192d /Makefile
parent678b073c4d7b59d117dc00edd2e9292b5d8561e9 (diff)
downloadvtcol-33931c9c5380252c44d8510248bbb91f18fb26e7.tar.gz
add build recipe for binary
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 013dc99..f413f68 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,22 @@
-manpage = doc/vtcol.1.gz
+manpage = doc/vtcol.1.gz
+cargo-target = ./target
+bin = $(cargo-target)/release/vtcol
+src = src/vtcol.rs
+meta = Cargo.toml
-cargo-target = ./target
+all: bin doc
-$(manpage): doc/vtcol.rst
- rst2man $< |gzip > $@
+bin: $(bin)
+
+doc: man
man: $(manpage)
-doc: man
+$(bin): $(src) $(meta)
+ cargo build --release
+
+$(manpage): doc/vtcol.rst
+ rst2man $< |gzip > $@
clean:
rm -f -- $(manpage)