diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-01 20:10:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-01 20:10:59 +0000 |
commit | f23e2c912dde2844552bcce852da26d62d527b04 (patch) | |
tree | 68c11cccf389b2d1124d390cf0637f7a022c2d84 /Master/texmf-dist/source/latex/doclicense/Makefile | |
parent | 1ab990bba773ee2a32134a371c63cad822089334 (diff) |
doclicense (1oct23)
git-svn-id: svn://tug.org/texlive/trunk@68424 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/doclicense/Makefile')
-rw-r--r-- | Master/texmf-dist/source/latex/doclicense/Makefile | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/doclicense/Makefile b/Master/texmf-dist/source/latex/doclicense/Makefile index 9f00b5930d0..619cc7e3d93 100644 --- a/Master/texmf-dist/source/latex/doclicense/Makefile +++ b/Master/texmf-dist/source/latex/doclicense/Makefile @@ -8,39 +8,60 @@ TEXMFHOME ?= $(shell kpsewhich -var-value TEXMFHOME) SHELL := /bin/bash -o nounset -o pipefail -o errexit +RELEASE_OPENPGP_FINGERPRINT ?= C505B5C93B0DB3D338A1B6005FE92C12EE88E1F0 +DOCLICENSE_VERSION ?= $(shell sed --quiet --regexp-extended 's/.* v([0-9.]+) Support for putting documents under a license\]/\1/p;' doclicense.dtx) + .PHONY: all -all: install build +all: build .PHONY: build build: manifest.txt doclicense.sty doclicense.pdf +# Duplicated in ../.github/workflows/ci.yml to have separate sections in the CI +# output for each step. .PHONY: ci -ci: lint build +ci: lint install-symlink build test-package-option-matrix-only-english -.PHONY: install -install: +.PHONY: install-symlink +install-symlink: doclicense.sty mkdir --parents "$(TEXMFHOME)/tex/latex/" - test -L "$(TEXMFHOME)/tex/latex/doclicense" || ln --no-target-directory --symbolic "$$PWD" "$(TEXMFHOME)/tex/latex/doclicense" + test -L "$(TEXMFHOME)/tex/latex/doclicense" || ln --no-target-directory --symbolic "$(shell pwd)" "$(TEXMFHOME)/tex/latex/doclicense" .PHONY: check check: check-copyright-date manifest.txt doclicense.sty lint # Run before release. .PHONY: check-full -check-full: check run_tests - ./run_tests +check-full: check test-package-option-matrix + +.PHONY: test-package-option-matrix +test-package-option-matrix: + ./test-package-option-matrix + +.PHONY: test-package-option-matrix-only-english +test-package-option-matrix-only-english: + ./test-package-option-matrix "english" # CTAN people want this when uploading a release. .PHONY: check-copyright-date -check-copyright-date: README.md - grep --quiet 'SPDX-FileCopyrightText:.*$(shell date +%Y)\s' "$<" +check-copyright-date: README.md doclicense.dtx + grep --quiet 'SPDX-FileCopyrightText:.*$(shell date +%Y)\s' README.md + grep --quiet 'SPDX-FileCopyrightText:.*$(shell date +%Y)\s' doclicense.dtx + +.PHONY: release-local +release-local: check-copyright-date + git tag --sign --local-user "$(RELEASE_OPENPGP_FINGERPRINT)" --message "Released version $(DOCLICENSE_VERSION) of doclicense" "doclicense/v$(DOCLICENSE_VERSION)" + +.PHONY: release-publish +release-publish: + git push --follow-tags .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 + reuse --root . lint .PHONY: clean clean: @@ -62,9 +83,10 @@ doclicense.pdf: # The `cd .. && git archive` trick was needed with 2.29.2 so that evaluation of # the `.gitattributes` file worked correctly. -manifest.txt: manifest_header.txt Makefile +.FORCE: +manifest.txt: manifest_header.txt Makefile .FORCE cat "$<" > "$@" echo "% This work consists of the files:" >> "$@" - cd .. && git archive --worktree-attributes HEAD doclicense | tar -t -f - | grep -v '/$$' | sort >> "$(PWD)/$@" + cd .. && git archive --worktree-attributes HEAD doclicense | tar -t -f - | grep -v '/$$' | sort >> "$(shell pwd)/$@" echo "% and the derived files:" >> "$@" echo doclicense.sty doclicense.pdf | tr ' ' '\n' >> "$@" |