]> arthur.barton.de Git - bup.git/commitdiff
make install: don't fail if documentation couldn't be built.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 8 Jun 2010 04:05:54 +0000 (00:05 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 8 Jun 2010 04:05:54 +0000 (00:05 -0400)
Just silently refuse to install the documentation instead.  Reported by Karl
Kiniger.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Documentation/.gitignore
Documentation/Makefile
Makefile

index 764de288071ae86745c3eb70465acbc5cf3f20b6..66426468900652ca78519483f4532c6b90996296 100644 (file)
@@ -1,2 +1,3 @@
 *.[0-9]
 *.html
+.docs-available
index 528b7b7cc7660d9e9913f847e364eb6f0c736580..15cb3cd3ce634b4ae65a31d3535b663df1275840 100644 (file)
@@ -1,9 +1,11 @@
 PANDOC:=$(shell \
        if pandoc </dev/null 2>/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
index 64884963ffcf15af45e315500a773d5a237bcc3c..617c3367e80ae29202e38978931654d950adb076 100644 (file)
--- 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)