1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#! make -f
VERSION=0.8
export UTRANS_DATA_DIR ?= $(CURDIR)
export SYSTEMD_UNIT_PATH=./input/user:./input
all:
sed -i 's#^readonly VERSION=[[:digit:]]\+\(\.[[:digit:]]\)\+#readonly VERSION=$(VERSION)#' utrans
sed -i -e '1 s#Version [[:digit:]]\+\(\.[[:digit:]]\)\+#Version $(VERSION)#' \
-e '1 s#"[[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}"#$(shell date -I)#' man/*.1
check: shellcheck mancheck
find ./t/expected -type f -executable -exec sh -n '{}' ';'
cd ./t && ./run
mancheck: man/*.1
groff -mandoc -t -K utf8 -ww -b -z $?
shellcheck:
ifeq (, $(shell which shellcheck))
$(warning "No shellcheck found in $(PATH), skipping")
else
shellcheck --external-sources --exclude SC2155 --severity=info utrans
shellcheck utrans-rc
endif
systemd-lsb-tests: t/expected/lsb/init.d/exec-*
cp t/test-exec_environmentfile.conf /tmp
for lsb_test in $^; do \
# Run each one in a new program group: exec-ignoresigpipe-yes signals \
# the whole group \
setsid $$lsb_test start; done
clean:
update-expected:
cd ./t && ./update
|