Files
ltk/Makefile
T
admin 35ab8ac2b0
CI / build + test (push) Canceled after 0s
CI / cargo audit (push) Canceled after 0s
The tab strip example in make examples
`make examples` ran every example but `tab_strip`, added with the widget, so it never came up among the others. It now runs last, after `clip_path`, with the repository's themes as the rest.
2026-10-15 11:25:03 +02:00

69 lines
2.4 KiB
Makefile

REGISTRY ?= /usr/share/cargo/registry/ltk
DOCDIR ?= /usr/share/doc/libltk-doc/html
# Targets are recipes, not files. Listing them as PHONY tells make to
# ignore filesystem entries with the same name — without this `examples`
# silently no-ops because the `examples/` directory exists, and `doc`
# would do the same once `target/doc` is around.
.PHONY: all test doctest-md stylecheck clippy audit doc install examples clean distclean
all:
cargo build --release
test:
cargo test --features test-support
# Typecheck the `no_run` snippets in docs/*.md by feeding each markdown
# file to `rustdoc --test`. Catches API drift in cookbook + widget
# reference: drops a renamed builder, removed function, etc. surface
# here just like `cargo test --doc` does for in-source doctests.
doctest-md:
./scripts/doctest-md.sh
# Mechanical style checks (tabs, attribute-bracket spacing) — the
# grep-verifiable subset of code_style_guide.md.
stylecheck:
./scripts/style-check.sh
# Semantic lints, mirroring the CI invocation. Warnings are errors so a
# local run predicts the CI verdict.
clippy:
cargo clippy --workspace --all-targets --features test-support -- -D warnings
audit:
@command -v cargo-audit >/dev/null 2>&1 || cargo install cargo-audit --locked
cargo audit
doc:
cargo doc --no-deps
install: doc
install -d $(REGISTRY)
cp -r src benches locales protocols keyboards Cargo.toml liberux.toml $(REGISTRY)/
cp debian/cargo-checksum.json $(REGISTRY)/.cargo-checksum.json
install -d $(DOCDIR)
cp -r target/doc/* $(DOCDIR)/
examples:
LTK_THEMES_DIR=themes cargo run --release --example showcase
LTK_THEMES_DIR=themes cargo run --release --example responsive
LTK_THEMES_DIR=themes cargo run --release --example inputs
LTK_THEMES_DIR=themes cargo run --release --example scroll
LTK_THEMES_DIR=themes cargo run --release --example sliders
LTK_THEMES_DIR=themes cargo run --release --example combo
LTK_THEMES_DIR=themes cargo run --release --example mini_shell
LTK_THEMES_DIR=themes cargo run --release --example widgets
LTK_THEMES_DIR=themes cargo run --release --example pickers
LTK_THEMES_DIR=themes cargo run --release --example dialog
LTK_THEMES_DIR=themes cargo run --release --example carousel
LTK_THEMES_DIR=themes cargo run --release --example clip_path
LTK_THEMES_DIR=themes cargo run --release --example tab_strip
clean:
dh_clean
cargo clean
rm -rf target
distclean: clean
rm -f Cargo.lock