--- a/Makefile Tue Apr 21 22:15:22 2015 +0200
+++ b/Makefile Wed Apr 22 07:41:45 2015 +0200
@@ -1,27 +1,38 @@
-TXT = short.txt
-HTML = out/short.html
-PDF = out/short.pdf
+TXT = short.txt # INPUT
-#REVISION = ${shell hg id -tibB}
-REVISION = ${shell hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}'}
+HTML = out/short.html # OUTPUT
+PDF = out/short.pdf # OUTPUT
+
DATE = ${shell date -I}
+ifeq (${wildcard .hg_archival.txt}, .hg_archival.txt)
+ REVISION = ${shell grep ^latesttag: .hg_archival.txt|cut -f2 -d' '}
+else
+ REVISION = ${shell hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}'}
+endif
+
+# Flags for asciidoc
AOPTS = -a revision="${REVISION}" -a date="${DATE}"
.PHONY: all clean pdf html
all: html pdf
-clean: ; rm -f ${HTML} ${PDF}
+clean:
+distclean: clean; rm -r out
pdf: ${PDF}
html: ${HTML}
out/%.pdf: %.txt $(MAKEFILE_LIST) short.conf
@mkdir -p ${dir $@}
- a2x -k --asciidoc-opts="${AOPTS}" -D ${dir $@} $<
+ a2x --asciidoc-opts="${AOPTS}" -D ${dir $@} $<
out/%.html: %.txt $(MAKEFILE_LIST) short.conf
@mkdir -p ${dir $@}
-# asciidoc -a revision="${REVISION}" -a date="${DATE}" -o $@ $<
asciidoc ${AOPTS} -o $@ $<
+
+publish: all
+ cd out \
+ && /bin/echo -e 'progress\nput *' \
+ | sftp -b - 'www.schlittermann.de@www.schlittermann.de:htdocs/doc/Exim_(de)/'
--- a/short.txt Tue Apr 21 22:15:22 2015 +0200
+++ b/short.txt Wed Apr 22 07:41:45 2015 +0200
@@ -7,7 +7,9 @@
:numbered:
:ascii-ids:
-Die Quelle dieses Dokuments ist: https://ssl.schlittermann.de/hg/doc/exim
+Die Quelle dieses Dokuments ist: https://ssl.schlittermann.de/hg/doc/exim, es
+gibt auch eine http://schlittermann.de/doc/Exim_(de)/short.html[HTML] und eine
+http://schlittermann.de/doc/Exim_(de)/short.pdf[PDF] Version.
////
_italic_::