From: Avery Pennarun Date: Tue, 8 Jun 2010 04:05:54 +0000 (-0400) Subject: make install: don't fail if documentation couldn't be built. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=951d88bb0a52b0322f755f2644943028cf8de896;p=packages%2Fb%2Fbup.git make install: don't fail if documentation couldn't be built. Just silently refuse to install the documentation instead. Reported by Karl Kiniger. Signed-off-by: Avery Pennarun --- diff --git a/Documentation/.gitignore b/Documentation/.gitignore index 764de28..6642646 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1,2 +1,3 @@ *.[0-9] *.html +.docs-available diff --git a/Documentation/Makefile b/Documentation/Makefile index 528b7b7..15cb3cd 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,9 +1,11 @@ PANDOC:=$(shell \ if pandoc /dev/null; then \ echo pandoc; \ + touch .docs-available; \ else \ echo "Warning: pandoc not installed; can't generate manpages." >&2; \ echo '@echo Skipping: pandoc'; \ + rm -f .docs-available; \ fi) BUP_VERSION:=$(shell ../bup version --tag) BUP_DATE:=$(shell ../bup version --date) @@ -30,4 +32,4 @@ html: $(patsubst %.1.md,%.html,$(wildcard *.md)) mv $@.new $@ clean: - rm -f *~ .*~ *.[0-9] *.new *.tmp *.html + rm -f *~ .*~ *.[0-9] *.new *.tmp *.html .docs-available diff --git a/Makefile b/Makefile index 6488496..617c336 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,12 @@ LIBDIR=$(DESTDIR)/usr/lib/bup install: all $(INSTALL) -d $(MANDIR)/man1 $(DOCDIR) $(BINDIR) \ $(LIBDIR)/bup $(LIBDIR)/cmd - $(INSTALL) -o 0 -g 0 -m 0644 \ + [ ! -e Documentation/.docs-available ] || \ + $(INSTALL) -o 0 -g 0 -m 0644 \ $(wildcard Documentation/*.1) \ $(MANDIR)/man1 - $(INSTALL) -o 0 -g 0 -m 0644 \ + [ ! -e Documentation/.docs-available ] || \ + $(INSTALL) -o 0 -g 0 -m 0644 \ $(wildcard Documentation/*.html) \ $(DOCDIR) $(INSTALL) -o 0 -g 0 -m 0755 bup $(BINDIR)