Skip to content

Commit

Permalink
Switch to Cargo.
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntSushi committed Jun 28, 2014
1 parent 1798350 commit 7ecf45a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 27 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.*.swp
test-runner
bench-runner
doc
tags
examples/data/ss10pusa.csv
*.rlib
*.so
build
target
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "csv"
version = "0.1.0"
authors = ["Andrew Gallant <[email protected]>"]

[[lib]]
name = "csv"
path = "src/lib.rs"

[dependencies.quickcheck]
git = "git:https://github.com/BurntSushi/quickcheck"

39 changes: 20 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
RUST_CFG=
BUILD ?= build
LIB ?= $(BUILD)/.timestamp_csv
RUST_PATH ?= -L $(BUILD) -L ./target/deps

compile:
rustc --opt-level=3 ./src/lib.rs
compile: $(LIB)

install:
cargo-lite install
$(LIB):
@mkdir -p $(BUILD)
rustc --opt-level=3 ./src/lib.rs --out-dir $(BUILD)
@touch $(BUILD)/.timestamp_csv

ctags:
ctags --recurse --options=ctags.rust --languages=Rust
Expand All @@ -18,29 +22,26 @@ docs:
in-dir doc fix-perms
rscp ./doc/* gopher:~/www/burntsushi.net/rustdoc/

test: test-runner
RUST_TEST_TASKS=1 RUST_LOG=quickcheck,csv ./test-runner
test: $(BUILD)/test
RUST_TEST_TASKS=1 RUST_LOG=quickcheck,csv $(BUILD)/test

test-runner: src/lib.rs src/test.rs src/bench.rs
rustc -L . --test src/lib.rs -o test-runner
$(BUILD)/test: $(LIB) src/lib.rs src/test.rs src/bench.rs
rustc $(RUST_PATH) --test src/lib.rs -o $(BUILD)/test

test-examples:
(cd ./examples && ./test)

bench: bench-runner
RUST_TEST_TASKS=1 RUST_LOG=quickcheck,csv ./bench-runner --bench
bench: $(BUILD)/bench
RUST_TEST_TASKS=1 RUST_LOG=quickcheck,csv $(BUILD)/bench --bench

bench-prof: bench-runner
RUST_TEST_TASKS=1 RUST_LOG=quickcheck,csv valgrind --tool=callgrind ./bench-runner --bench
bench-prof: $(BUILD)/bench
RUST_TEST_TASKS=1 RUST_LOG=quickcheck,csv valgrind --tool=callgrind $(BUILD)/bench --bench

bench-runner: src/lib.rs src/test.rs src/bench.rs
rustc -g -L . --opt-level=3 -Z lto --test $(RUST_CFG) src/lib.rs -o bench-runner
$(BUILD)/bench: $(LIB) src/lib.rs src/test.rs src/bench.rs
rustc -g $(RUST_PATH) --opt-level=3 -Z lto --test $(RUST_CFG) src/lib.rs -o $(BUILD)/bench

test-clean:
rm -rf ./test-runner ./bench-runner

clean: test-clean
rm -f *.rlib *.so
clean:
rm -f $(BUILD)/* $(LIB)

push:
git push origin master
Expand Down
4 changes: 0 additions & 4 deletions cargo-lite.conf

This file was deleted.

0 comments on commit 7ecf45a

Please sign in to comment.