]> arthur.barton.de Git - bup.git/blobdiff - Documentation/Makefile
Restore any metadata during "bup restore"; add "bup meta --edit".
[bup.git] / Documentation / Makefile
index 528b7b7cc7660d9e9913f847e364eb6f0c736580..067f69884965daa5f8d991461f2e17f7e25a0b4b 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)
@@ -12,14 +14,14 @@ 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: %.md.tmp
@@ -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