diff options
author | Erich Eckner <git@eckner.net> | 2016-10-11 13:32:46 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-10-11 14:24:11 +0200 |
commit | 903564349edb8e2ef457a5dbf09d3ed9c9c206f5 (patch) | |
tree | ef7a476c37e967d4df02ed21d5b38d4c9944d09e /Makefile | |
parent | 42b083a197c3d29cce74c22606e16317f18f808b (diff) | |
download | hardlinkedBackups-903564349edb8e2ef457a5dbf09d3ed9c9c206f5.tar.xz |
alle manpages sollten jetzt funktionieren
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -19,6 +19,7 @@ # USA. # +SHELL = /bin/bash DESTDIR = ETCDIR = /etc BINDIR = /usr/bin @@ -26,15 +27,20 @@ MANDIR = /usr/share/man VERSION = 1.1 -all: backup backup.1 lastBackups lastBackups.1 backupStatistics backupStatistics.1 +all: man.commons backup backup.1 lastBackups lastBackups.1 backupStatistics backupStatistics.1 %: %.in - sed "s/#VERSION#/$(VERSION)/; s@#BINDIR#@$(BINDIR)@; s@#ETCDIR#@$(ETCDIR)@; s@#NUMSTAGES#@5@" $< > $@ - -%.common: man.commons - grep -v "^$(@:.common=)(" $< > $@ - -%.1: % %.common + sed " \ + s/#VERSION#/$(VERSION)/; \ + s@#BINDIR#@$(BINDIR)@; \ + s@#ETCDIR#@$(ETCDIR)@; \ + s@#NUMSTAGES#@5@; \ + s@#HELPTEXT#\(\s\+\)#@ --help \1display this help and exit\n --version\1display version and exit@; \ + " $< > $@ && \ + ( [[ "$@" = *.* ]] || chmod +x "$@" ) + +%.1: % man.commons + grep -v "^$<(" man.commons | sed '/^\[SEE ALSO]$$/{n;:a;N;/\[/b;s/\n/, /;ta;}' > "$<.common" && \ help2man -o "$@" -N --include $<.common --no-discard-stderr "./$<" .PHONY: install dist clean @@ -45,7 +51,7 @@ install: all install -D -m0644 -t $(DESTDIR)$(ETCDIR) backup.conf clean: - cat .gitignore | xargs rm -f + git clean -x -d -f dist: clean git status --porcelain 2> /dev/null | grep -q "\S" && (git add .; git commit -m"neue Version: $(VERSION)") || true |