2019-02-05 18:50:44 -06:00
|
|
|
SHELL = /bin/bash -o pipefail
|
|
|
|
|
2020-01-04 11:31:32 -06:00
|
|
|
# some platform compatibility hacks
|
|
|
|
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
|
|
|
|
execsuffix := $(if $(findstring Windows_NT,$(OS)),.exe, )
|
|
|
|
pathchar := $(if $(findstring Windows_NT,$(OS)),\,/)
|
|
|
|
|
|
|
|
sourcefiles := $(call rwildcard,src,*.rs)
|
|
|
|
|
2019-01-08 20:32:16 -06:00
|
|
|
all: test build
|
|
|
|
|
2020-01-04 11:31:32 -06:00
|
|
|
debugtarget := target$(pathchar)debug$(pathchar)ucg$(execsuffix)
|
|
|
|
releasetarget := target$(pathchar)release$(pathchar)ucg$(execsuffix)
|
|
|
|
|
|
|
|
$(debugtarget): $(sourcefiles)
|
|
|
|
cargo build
|
|
|
|
|
|
|
|
$(releasetarget): $(sourcefiles)
|
|
|
|
cargo build --release
|
|
|
|
|
|
|
|
build: $(debugtarget)
|
2019-01-08 20:32:16 -06:00
|
|
|
cargo build
|
|
|
|
|
2020-01-04 11:31:32 -06:00
|
|
|
buildrelease: $(releasetarget)
|
|
|
|
|
2019-02-19 16:37:33 -06:00
|
|
|
test: unit integration stdlibtest
|
2019-01-08 20:32:16 -06:00
|
|
|
|
2019-02-19 16:37:33 -06:00
|
|
|
unit:
|
|
|
|
cargo test
|
2019-01-31 16:55:40 -06:00
|
|
|
|
2019-02-19 16:37:33 -06:00
|
|
|
integration:
|
|
|
|
cargo run -- test -r integration_tests
|
2019-01-31 16:55:40 -06:00
|
|
|
|
2019-02-19 16:37:33 -06:00
|
|
|
stdlibtest:
|
2020-05-25 10:59:59 -04:00
|
|
|
cargo run -- test -r std$(pathchar)tests
|
2019-01-15 19:33:08 -06:00
|
|
|
|
|
|
|
install: test
|
2019-01-19 13:18:06 -06:00
|
|
|
cargo install --path . --force
|
|
|
|
|
|
|
|
publish: build test
|
2019-01-31 16:55:40 -06:00
|
|
|
cargo publish
|
2019-02-05 18:50:44 -06:00
|
|
|
(cd docsite; make deploysite)
|
|
|
|
|
2020-01-04 11:31:32 -06:00
|
|
|
bench: buildrelease
|
|
|
|
hyperfine --warmup=5 --runs=50 "target$(pathchar)release$(pathchar)ucg$(execsuffix) test -r integration_tests"
|
|
|
|
|
2019-02-05 18:50:44 -06:00
|
|
|
clean:
|
2020-01-04 11:31:32 -06:00
|
|
|
rm -f integration.log stdlibtest.log unittest.log
|
|
|
|
cargo clean
|