summaryrefslogtreecommitdiff
path: root/doc/doc-docbook/GenLocalParams
diff options
context:
space:
mode:
authorPhil Pennock <pdp@exim.org>2013-10-03 16:13:52 -0400
committerTodd Lyons <tlyons@exim.org>2013-10-03 16:26:38 -0700
commit99474a17d13e1aab63584b67abd83973aa9dbabd (patch)
treedc43f9f6a75eae02cb393081ab4158d7af8e9ba8 /doc/doc-docbook/GenLocalParams
parenta8c3430674ceb70b5dda7dfe7ddf4374196c955d (diff)
Finish the xfpt fix.
The readers of the version expect no surrounding whitespace; putting the content in-place requires macro expansion, which requires that .literal mode be `layout` or `off`, but either of those will escape the XML angle brackets. The easiest fix is to generate the XML as part of the macro definition. Moved local_params rules out of Makefile and into GenLocalParams
Diffstat (limited to 'doc/doc-docbook/GenLocalParams')
-rwxr-xr-xdoc/doc-docbook/GenLocalParams23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/doc-docbook/GenLocalParams b/doc/doc-docbook/GenLocalParams
new file mode 100755
index 000000000..140890880
--- /dev/null
+++ b/doc/doc-docbook/GenLocalParams
@@ -0,0 +1,23 @@
+#!/bin/sh -eu
+
+output="${1:-local_params}"
+: ${EXIM_VER:?Need the EXIM_VER environment variable}
+
+nicedate="$(date +"%d %b %Y")"
+
+exec > "$output"
+cat <<EOTEMPLATE
+.macro version
+${EXIM_VER}
+.endmacro
+.macro fulldate
+${nicedate}
+.endmacro
+.macro year
+$(date +%Y)
+.endmacro
+.macro versiondatexml
+<revnumber>${EXIM_VER}</revnumber>
+<date>${nicedate}</date>
+.endmacro
+EOTEMPLATE