summaryrefslogtreecommitdiff
path: root/Makefile
blob: 446ffe91d95e82b45d677fb1761fd43b85c16bf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
manpage		= doc/vtcol.1.gz
cargo-target 	= ./target
bin 		= $(cargo-target)/release/vtcol
src 		= src/vtcol.rs
meta 		= Cargo.toml
rustdoc-entry	= target/doc/vtcol/index.html

all: bin doc

bin: $(bin)

doc: man rustdoc

man: $(manpage)

rustdoc: $(rustdoc-entry)

$(bin): $(src) $(meta)
	cargo build --release

$(manpage): doc/vtcol.rst
	rst2man $< |gzip > $@

$(rustdoc-entry): $(src) $(meta)
	cargo doc --bins

clean:
	rm -f -- $(manpage)
	rm -rf -- $(cargo-target)

.PHONY: clean