summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/doclicense/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/doclicense/Makefile')
-rw-r--r--macros/latex/contrib/doclicense/Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/macros/latex/contrib/doclicense/Makefile b/macros/latex/contrib/doclicense/Makefile
index 62eb5c63ca..bfa65debc3 100644
--- a/macros/latex/contrib/doclicense/Makefile
+++ b/macros/latex/contrib/doclicense/Makefile
@@ -6,25 +6,35 @@
# For more details about the licensing, refer to the README.md file.
TEXMFHOME ?= $(shell kpsewhich -var-value TEXMFHOME)
+SHELL := /bin/bash -o nounset -o pipefail -o errexit
-all: install build manifest.txt
+.PHONY: all
+all: install build
-build: check-quick doclicense.sty doclicense.pdf
+.PHONY: build
+build: manifest.txt doclicense.sty doclicense.pdf
+.PHONY: ci
+ci: lint build
+
+.PHONY: install
install:
mkdir --parents "$(TEXMFHOME)/tex/latex/"
test -L "$(TEXMFHOME)/tex/latex/doclicense" || ln --no-target-directory --symbolic "$$PWD" "$(TEXMFHOME)/tex/latex/doclicense"
-check-quick: doclicense.dtx
- chktex "$<"
-
+# Run before release.
+.PHONY: check
check: run_tests doclicense.sty lint
./"$<"
-lint:
+.PHONY: lint
+lint: doclicense.dtx
+ chktex "$<"
find -regextype posix-egrep -iregex '.*\.(tex|ldf)' -and -not -iname '*-plaintext.tex' -print0 | xargs --null chktex
+ [[ -z "$(shell lacheck "$<" *.ldf | grep 'possible unwanted space')" ]]
reuse lint
+.PHONY: clean
clean:
rm -rf *.sty *.pdf *.aux *.out *.glo *.gls *.hd *.idx *.ilg *.ind *.log *.toc