From 42b083a197c3d29cce74c22606e16317f18f808b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 11 Oct 2016 11:20:06 +0200 Subject: manpage-Erzeugung halbwegs automatisiert --- Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8b4d3e5..805b51d 100644 --- a/Makefile +++ b/Makefile @@ -26,22 +26,26 @@ MANDIR = /usr/share/man VERSION = 1.1 -all: hardlinkedbackups.1 backup lastBackups +all: backup backup.1 lastBackups lastBackups.1 backupStatistics backupStatistics.1 %: %.in - sed "s/#VERSION#/$(VERSION)/; s@#BINDIR#@$(BINDIR)@; s@#ETCDIR#@$(ETCDIR)@" $< > $@ + sed "s/#VERSION#/$(VERSION)/; s@#BINDIR#@$(BINDIR)@; s@#ETCDIR#@$(ETCDIR)@; s@#NUMSTAGES#@5@" $< > $@ + +%.common: man.commons + grep -v "^$(@:.common=)(" $< > $@ + +%.1: % %.common + help2man -o "$@" -N --include $<.common --no-discard-stderr "./$<" .PHONY: install dist clean install: all - install -D -m0755 -t $(DESTDIR)$(BINDIR) backup lastBackups - install -D -m0644 -t $(DESTDIR)$(MANDIR)/man1 hardlinkedbackups.1 - ln -s $(DESTDIR)$(MANDIR)/man1/hardlinkedbackups.1 $(DESTDIR)$(MANDIR)/man1/backups.1 - ln -s $(DESTDIR)$(MANDIR)/man1/hardlinkedbackups.1 $(DESTDIR)$(MANDIR)/man1/lastBackups.1 + install -D -m0755 -t $(DESTDIR)$(BINDIR) backup backupStatistics lastBackups + install -D -m0644 -t $(DESTDIR)$(MANDIR)/man1 backup.1 lastBackups.1 backupStatistics.1 install -D -m0644 -t $(DESTDIR)$(ETCDIR) backup.conf clean: - rm -f backup lastBackups hardlinkedbackups.1 + cat .gitignore | xargs rm -f dist: clean git status --porcelain 2> /dev/null | grep -q "\S" && (git add .; git commit -m"neue Version: $(VERSION)") || true -- cgit v1.2.3-54-g00ecf