diff options
author | Erich Eckner <git@eckner.net> | 2016-10-11 11:20:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-10-11 14:24:10 +0200 |
commit | 42b083a197c3d29cce74c22606e16317f18f808b (patch) | |
tree | 47e1a66446df12466ba9f3bb1f6bbabd18b106ed /Makefile | |
parent | c60863c3ac79685da35840324f742439da9c5e1a (diff) | |
download | hardlinkedBackups-42b083a197c3d29cce74c22606e16317f18f808b.tar.xz |
manpage-Erzeugung halbwegs automatisiert
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -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 |