summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 11 insertions, 7 deletions
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