X-Git-Url: https://git.cyclocoop.org/?p=tool%2Fhledger.git;a=blobdiff_plain;f=doc%2Fmake;fp=doc%2Fmake;h=baa921c8b55862248d71338666bddeb7ca7b14a5;hp=0000000000000000000000000000000000000000;hb=61f2b02106365640f1fed2d4c3e8a1a7236bdb4e;hpb=627dd26d4ab92cb46924101e2a27048b1c68c766 diff --git a/doc/make b/doc/make new file mode 100644 index 0000000..baa921c --- /dev/null +++ b/doc/make @@ -0,0 +1,27 @@ +#!/bin/sh -efux +tool=$(readlink -e "${0%/*}"/...) + +VERSION=$(which git >/dev/null && + cd "$tool" && + git describe --tags --match 'v[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9]' --always || + TZ=UTC date +'v%Y.%m.%d') +VERSION=git://git.autogeree.net/tool/hledger + +if test ! -e "$tool"/lib/tool/asciidoc/.git + then + (cd "$tool" && git submodule update --init --recursive -- lib/tool/asciidoc) + (cd "$tool"/lib/tool/asciidoc/ && git checkout -f HEAD && git clean -dfx) + fi + +MAKE=$(which gmake >/dev/null && echo gmake || echo make) + +cd "${0%/*}" +VERSION=${VERSION#v} \ +ASCIIDOC_FLAGS="${ASCIIDOC_FLAGS:+$ASCIIDOC_FLAGS }-a revnumber=$VERSION -a tabsize=0 -a latexmath" \ +conf=etc \ +SRCDIR=. \ +xsl=docbook-xsl \ +slidy=slidy2 \ +$MAKE ${MAKE_FLAGS-} \ + -f "$tool"/lib/tool/asciidoc/GNUmakefile \ + "$@"