logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: a34a82c241e1c7c7dd46a79e57b732fb157577cf
parent 2fdfcbb0cef9aee5d2372dc243945d85c8cec0d5
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 18 Sep 2024 05:36:14 +0200

Makefile: add build-checks target

Diffstat:

MMakefile3+++
MREADME.md4++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -50,6 +50,9 @@ check-man: $(MAN1SO) err=0; for i in $(EXE); do if test ! -f $$i.1 && test ! -f $$i.1.in; then echo "$$i: missing manpage"; err=1; fi; done; exit $$err for i in $(MAN1) ; do grep -q 'EXIT STATUS' $$i || echo "$i lacks EXIT STATUS"; grep -q 'STANDARDS' $$i || echo "$i lacks STANDARDS"; done +.PHONY: build-checks +build-checks: all $(TEST_CMDS) $(TEST_LIBS) + .PHONY: lint lint: $(MAN1SO) $(MANDOC) -Tlint -Wunsupp,error,warning $(MAN1) diff --git a/README.md b/README.md @@ -24,6 +24,10 @@ Developed on Linux+musl, automatically tested on FreeBSD and NetBSD thanks to [S - If you want statically linked executables, pass `LDSTATIC=-static` to configure (environment or argument) - `./bootstrap.sh` will compile the few utilities used by `./configure` for you +## Cross-compiling +Set the `CC` and `CFLAGS` environment variables for your target. +To compile the test binaries without running them, run `make build-checks` + ## Design differences - All programs prefix their messages with their name. This way you don't end up with context-less messages in scripts. - When the output is structured data, a terminal gets human-oriented output, others like piped programs get machine-oriented output (no padding, line separation, CSV, JSON, …). Prior art: most `ls(1)` implementations, i3/sway, FreeBSD utils via `libxo`, …