clap/Makefile

23 lines
490 B
Makefile
Raw Normal View History

2015-03-18 23:42:06 +00:00
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
test:
cargo test
build:
cargo build
doc:
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
rm -rf docs/*
2015-03-18 23:42:06 +00:00
(cargo doc --no-deps && make clean) || (make clean && false)
clean:
2015-03-23 02:03:28 +00:00
cp -r target/doc/* docs/
2015-03-18 23:42:06 +00:00
cd "$(THIS_DIR)"
mv code.bak src/lib.rs || true
rm *.bak || true