42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
# Copyright (C) 2018 Luke Shumaker
|
|
# Copyright (C) 2023-2024 Umorpha Systems
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
shell_programs += bin/osi-mk
|
|
shell_programs += bin/osi-shell
|
|
shell_programs += bin/osi-mount
|
|
shell_programs += bin/osi-extract
|
|
|
|
python_programs += lib/pacman-choices
|
|
|
|
perl_programs += lib/indent
|
|
|
|
|
|
# Lint #########################################################################
|
|
|
|
lint:
|
|
@PS4=; r=0; set -x; { \
|
|
git ls-files ':*.sh' $(shell_programs) | xargs shellcheck --exclude=SC2064 -- || r=$$?; \
|
|
MYPYPATH=$$PWD/mypy-stubs mypy --strict $(python_programs) || r=$$?; \
|
|
black --check $(python_programs) mypy-stubs || r=$$?; \
|
|
isort --check $(python_programs) mypy-stubs || r=$$?; \
|
|
}; exit $$r
|
|
.PHONY: lint
|
|
|
|
# Check ########################################################################
|
|
|
|
check:
|
|
PATH=$(CURDIR)/bin:$$PATH && cd test && bats .
|
|
.PHONY: check
|
|
|
|
# Generate #####################################################################
|
|
|
|
generate/files = COPYING.txt
|
|
COPYING.txt:
|
|
curl https://www.gnu.org/licenses/agpl-3.0.txt >$@
|
|
|
|
generate: $(generate/files)
|
|
generate-clean:
|
|
rm -f -- $(generate/files)
|
|
.PHONY: generate generate-clean
|