Anki/lib-rspy/Makefile
Damien Elmes b23b6fbe35 move the separate components back into this monorepo
Earlier today I pushed a change that split this code up into multiple
repos, but that has proved to complicate things too much. So we're
back to a single repo, except the individual submodules are better
separated than they were before.

The README files need updating again; I will push them out soon.

Aside from splitting out the different modules, the sound code has
moved from from anki to aqt.
2020-01-02 19:43:19 +10:00

44 lines
985 B
Makefile

SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
$(shell mkdir -p .build ../build)
OUTDIR := ../build
BUILDFLAGS := --release --strip
.PHONY: all develop build check fix clean
all: develop
develop: .build/tools
maturin develop $(BUILDFLAGS)
build: .build/tools
rm -rf $(OUTDIR)/ankirspy*
maturin build -i $(shell which python3) -o $(OUTDIR) $(BUILDFLAGS)
check: .build/check
fix:
cargo fmt
clean:
rm -rf .build target
# nightly currently required for ignoring files in rustfmt.toml
RUST_TOOLCHAIN := $(shell cat rust-toolchain)
.build/tools: requirements.txt rust-toolchain
pip install -r requirements.txt
rustup toolchain install $(RUST_TOOLCHAIN)
rustup component add rustfmt-preview --toolchain $(RUST_TOOLCHAIN)
rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
@touch $@
.build/check: build
cargo fmt -- --check
cargo clippy -- -D warnings
@touch $@