2022-01-03 13:50:19 +00:00
|
|
|
ifeq ($(shell UNAME),Darwin)
|
|
|
|
EXT := dylib
|
|
|
|
else
|
|
|
|
EXT := so
|
|
|
|
endif
|
|
|
|
|
2019-06-04 09:09:58 +00:00
|
|
|
source_files := $(wildcard src/*.rs)
|
|
|
|
|
2022-01-03 13:50:19 +00:00
|
|
|
all: tantivy/tantivy.$(EXT)
|
2019-06-04 09:09:58 +00:00
|
|
|
|
|
|
|
PHONY: test format
|
|
|
|
|
2022-01-03 13:50:19 +00:00
|
|
|
test: tantivy/tantivy.$(EXT)
|
2019-06-04 09:09:58 +00:00
|
|
|
python3 -m pytest
|
|
|
|
|
|
|
|
format:
|
|
|
|
rustfmt src/*.rs
|
|
|
|
|
2022-01-03 13:50:19 +00:00
|
|
|
tantivy/tantivy.$(EXT): target/debug/libtantivy.$(EXT)
|
|
|
|
cp target/debug/libtantivy.$(EXT) tantivy/tantivy.so
|
2019-06-04 09:09:58 +00:00
|
|
|
|
2022-01-03 13:50:19 +00:00
|
|
|
target/debug/libtantivy.$(EXT): $(source_files)
|
2019-06-04 09:09:58 +00:00
|
|
|
cargo build
|