40 lines
1.5 KiB
Makefile
40 lines
1.5 KiB
Makefile
SH ?= sh
|
|
PYTHON ?= python
|
|
|
|
PREFIX ?= /usr/local
|
|
EXEC_PREFIX ?= ${PREFIX}
|
|
BINDIR ?= ${EXEC_PREFIX}/bin
|
|
|
|
TEST_COMMAND = ./pistepirkko --hostname testhost
|
|
|
|
all: pistepirkko
|
|
|
|
pistepirkko:
|
|
$(PYTHON) -m zipapp -p "/usr/bin/env python3" -o pistepirkko src/
|
|
|
|
check: pistepirkko
|
|
$(SH) tests/test-output.sh tests/config-errors.conf \
|
|
$(TEST_COMMAND) --config tests/config-errors.conf
|
|
$(SH) tests/test-output.sh tests/config-warnings.conf \
|
|
$(TEST_COMMAND) --config tests/config-warnings.conf
|
|
$(SH) tests/test-output.sh tests/conditional-redefinition.conf \
|
|
$(TEST_COMMAND) --config tests/conditional-redefinition.conf
|
|
$(SH) tests/test-output.sh tests/command-line-pattern-diagnostics.transcript \
|
|
$(TEST_COMMAND) --config tests/empty.conf --include '~foo' --exclude foo/../bar
|
|
$(SH) tests/test-output.sh tests/missing-category.conf \
|
|
$(TEST_COMMAND) --config tests/missing-category.conf --repo tests/mock-repo --under tests/mock-under
|
|
$(SH) tests/test-output.sh tests/presence.conf \
|
|
$(TEST_COMMAND) --config tests/presence.conf --repo tests/mock-repo --under tests/mock-under
|
|
$(SH) tests/test-output.sh tests/per-host.conf \
|
|
$(TEST_COMMAND) --config tests/per-host.conf --repo tests/mock-repo --under tests/mock-under
|
|
$(SH) tests/test-output.sh tests/present-but-not-included.conf \
|
|
$(TEST_COMMAND) --config tests/present-but-not-included.conf --repo tests/mock-repo --under tests/mock-under
|
|
|
|
install: pistepirkko
|
|
install -d '${DESTDIR}${BINDIR}'
|
|
install -m 755 pistepirkko '${DESTDIR}${BINDIR}'
|
|
|
|
clean:
|
|
rm -f pistepirkko
|
|
|
|
.PHONY: all check clean install
|