From 7890c38cce1e5cfceb4b6e6fe994e2a742b8b765 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 13 Oct 2016 15:11:44 +0200 Subject: manpage automatisch erzeugen --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2a82a8d..a808e4d 100644 --- a/Makefile +++ b/Makefile @@ -27,10 +27,18 @@ MANDIR = /usr/share/man VERSION = 4.0.7 -all: crypt-expiry-check crypt-expiry-check.cron crypt-expiry-check.1 +all: man.commons crypt-expiry-check crypt-expiry-check.cron crypt-expiry-check.1 %: %.in sed "s/#VERSION#/$(VERSION)/; s@#CRONDIR#@$(CRONDIR)@; s@#BINDIR#@$(BINDIR)@; s@#ETCDIR#@$(ETCDIR)@" $< > $@ + [ "$@" = "crypt-expiry-check" ] && chmod +x "$@" || true + +%.1: % man.commons + grep -v "^$<(" man.commons | sed '/^\[SEE ALSO]$$/{n;:a;N;/\[/b;s/\n/, /;ta;}' > "$<.common" && \ + help2man \ + -n 'Check expiry of gpg-keys and X.509 certificates' \ + -h -h -v -Z \ + -o "$@" -N --include $<.common --no-discard-stderr "./$<" .PHONY: install dist clean @@ -41,8 +49,10 @@ install: all install -D -m0644 -t $(DESTDIR)$(ETCDIR) crypt-expiry.checks clean: - rm -f crypt-expiry-check crypt-expiry-check.cron crypt-expiry-check.1 - + ls -A | \ + grep "^\($(shell cat .gitignore | sed 's|\.|\\.|; s|\*|.*|; s|$$|\\|' | tr '\n' '\|' )\)\$$" | \ + xargs -r rm + dist: clean git status --porcelain 2> /dev/null | grep -q "\S" && (git add .; git commit -m"neue Version: $(VERSION)") || true ! git tag -d v$(VERSION) 2> /dev/null -- cgit v1.2.3-54-g00ecf