From 3d5a3545f7d900177ecee5046d6660f878d96537 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 15 Nov 2021 20:14:50 +0100 Subject: decontaminate library from clap and anyhow deps --- Makefile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 446ffe9..a8db336 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,19 @@ manpage = doc/vtcol.1.gz cargo-target = ./target bin = $(cargo-target)/release/vtcol -src = src/vtcol.rs +lib = $(cargo-target)/release/libvtcol.rlib +bin-src = src/vtcol.rs +lib-src = src/lib.rs +src = $(bin-src) $(lib-src) meta = Cargo.toml rustdoc-entry = target/doc/vtcol/index.html -all: bin doc +all: bin lib doc + +check: $(src) + cargo test + +lib: $(lib) bin: $(bin) @@ -15,8 +23,11 @@ man: $(manpage) rustdoc: $(rustdoc-entry) +$(lib): $(lib-src) $(meta) + cargo build --release + $(bin): $(src) $(meta) - cargo build --release + cargo build --bin=vtcol --features=vtcol-bin --release $(manpage): doc/vtcol.rst rst2man $< |gzip > $@ @@ -28,4 +39,4 @@ clean: rm -f -- $(manpage) rm -rf -- $(cargo-target) -.PHONY: clean +.PHONY: clean check -- cgit v1.2.3