clap/Makefile

26 lines
675 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
2015-07-29 19:18:05 +00:00
update-readme:
2015-03-18 23:42:06 +00:00
cd "$(THIS_DIR)"
cp src/lib.rs code.bak
cat README.md | sed -e 's/^/\/\/! /g' > readme.bak
2015-07-29 19:18:05 +00:00
sed -i '/\/\/!/d' src/lib.rs
2015-03-18 23:42:06 +00:00
sed -i '/\/\/ DOCS/r readme.bak' src/lib.rs
2015-07-29 19:18:05 +00:00
cat src/lib.rs | sed -e 's/`rust/`ignore/g' > src/lib.rs.tmp
cat src/lib.rs.tmp | sed -e 's/`toml/`ignore/g' > src/lib.rs
cat src/lib.rs | sed -e 's/\`sh/`ignore/g' > src/lib.rs.tmp
make clean || (make clean && false)
2015-03-18 23:42:06 +00:00
clean:
cd "$(THIS_DIR)"
mv code.bak src/lib.rs || true
2015-07-29 19:18:05 +00:00
rm src/lib.rs.t* || true
2015-03-18 23:42:06 +00:00
rm *.bak || true