Makefile

 1# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
 2#
 3# SPDX-License-Identifier: CC0-1.0
 4
 5.PHONY: build test check format install clean help reuse
 6
 7PREFIX ?= $(HOME)/.local
 8
 9build:
10	gleam build
11
12test:
13	gleam test
14
15check:
16	gleam format --check
17
18format:
19	gleam format
20
21install: build
22	gleam run -m gleescript -- --out=$(PREFIX)/bin
23
24clean:
25	rm -rf build
26
27reuse:
28	reuse lint
29
30help:
31	@echo "Usage: make [target]"
32	@echo ""
33	@echo "Targets:"
34	@echo "  build    Build the project"
35	@echo "  test     Run tests"
36	@echo "  check    Check formatting"
37	@echo "  format   Format source files"
38	@echo "  install  Install to PREFIX/bin (default: ~/.local/bin)"
39	@echo "  clean    Remove build artifacts"
40	@echo "  reuse    Run REUSE lint"
41	@echo "  help     Show this help"
42	@echo ""
43	@echo "Variables:"
44	@echo "  PREFIX   Installation prefix (default: ~/.local)"