logo

9utils

Collection of utilities inspired by Plan9

Makefile (702B)


  1. # Collection of utilities inspired by Plan9
  2. # SPDX-FileCopyrightText: 2023 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. HARE ?= hare
  5. CRAM ?= cram
  6. PREFIX ?= /usr/local
  7. BINDIR ?= $(PREFIX)/bin/
  8. MANDIR ?= $(PREFIX)/share/man/
  9. MAN1DIR ?= $(MANDIR)/man1/
  10. DESTDIR ?=
  11. CMDS = cmd/unicode
  12. MANS = cmd/unicode.1
  13. all: $(CMDS)
  14. .SUFFIXES: .ha
  15. .ha:
  16. $(HARE) build $(HAREFLAGS) -o $@ $<
  17. .PHONY: lint
  18. lint:
  19. mandoc -T lint -W warning ${MANS}
  20. reuse lint
  21. .PHONY: check
  22. check: all
  23. $(CRAM) test-cmd/*.t
  24. .PHONY: install
  25. install: all
  26. mkdir -p ${DESTDIR}/${BINDIR}
  27. cp -p ${CMDS} ${DESTDIR}/${BINDIR}
  28. mkdir -p ${DESTDIR}/${MAN1DIR}
  29. cp ${MANS} ${DESTDIR}/${MAN1DIR}