mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
22 lines
490 B
Makefile
22 lines
490 B
Makefile
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/*
|
|
(cargo doc --no-deps && make clean) || (make clean && false)
|
|
|
|
clean:
|
|
cp -r target/doc/* docs/
|
|
cd "$(THIS_DIR)"
|
|
mv code.bak src/lib.rs || true
|
|
rm *.bak || true
|