summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 175ee0333da2015c140f2e514ef524caf5928be2 (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
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)

test:
	cargo test

build:
	cargo build

docs:
	cd "$(THIS_DIR)"
	cp src/lib.rs code.bak
	cat README.md | sed -e 's/^/\/\/! /g' > readme.bak
	sed -i '/\/\/ DOCS/r readme.bak' src/lib.rs
	(cargo doc --no-deps && make clean) || (make clean && false)

clean:
	cd "$(THIS_DIR)"
	mv code.bak src/lib.rs || true
	rm *.bak || true

upload:
	cd "$(THIS_DIR)"
	echo '<!doctype html><title>rust-vobject</title><meta http-equiv="refresh" content="0; ./vobject/">' \
		> ./target/doc/index.htm
	rsync -av --chmod=755 ./target/doc/ untispace:~/virtual/rust-vobject.unterwaditzer.net/

clippy:
	cargo build --features=clippy