]> arthur.barton.de Git - bup.git/blobdiff - Documentation/Makefile
Use "EXAMPLES" consistently in the manpages.
[bup.git] / Documentation / Makefile
index 0b494a932d9fbb9efcea3a78b385aff82d0069a8..067f69884965daa5f8d991461f2e17f7e25a0b4b 100644 (file)
@@ -1,28 +1,30 @@
 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 git describe --match 'bup-*' | sed 's/^bup-//')
-BUP_DATE=$(shell git log --no-walk --pretty='%ci%n' | (read x y && echo $$x))
+BUP_VERSION:=$(shell ../bup version --tag)
+BUP_DATE:=$(shell ../bup version --date)
 
 default: all
 
 all: man html
 
-man: $(patsubst %.md,%,$(wildcard *.md))
+man: $(patsubst %.md,%.1,$(wildcard *.md))
 
-html: $(patsubst %.1.md,%.html,$(wildcard *.md))
+html: $(patsubst %.md,%.html,$(wildcard *.md))
 
-%: %.md.tmp Makefile
+%.1: %.md.tmp Makefile
        $(PANDOC) -s -r markdown -w man -o $@ $<
        
-%.html: %.1.md.tmp Makefile
+%.html: %.md.tmp Makefile
        $(PANDOC) -s -r markdown -w html -o $@ $<
        
-.PRECIOUS: %.1.md.tmp
+.PRECIOUS: %.md.tmp
 %.md.tmp: %.md Makefile
        rm -f $@ $@.new
        sed -e 's,%BUP_VERSION%,${BUP_VERSION},g' \
@@ -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