Ajout : doc/
[tool/hledger.git] / doc / make
1 #!/bin/sh -efux
2 tool=$(readlink -e "${0%/*}"/...)
3
4 VERSION=$(which git >/dev/null &&
5 cd "$tool" &&
6 git describe --tags --match 'v[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9]' --always ||
7 TZ=UTC date +'v%Y.%m.%d')
8 VERSION=git://git.autogeree.net/tool/hledger
9
10 if test ! -e "$tool"/lib/tool/asciidoc/.git
11 then
12 (cd "$tool" && git submodule update --init --recursive -- lib/tool/asciidoc)
13 (cd "$tool"/lib/tool/asciidoc/ && git checkout -f HEAD && git clean -dfx)
14 fi
15
16 MAKE=$(which gmake >/dev/null && echo gmake || echo make)
17
18 cd "${0%/*}"
19 VERSION=${VERSION#v} \
20 ASCIIDOC_FLAGS="${ASCIIDOC_FLAGS:+$ASCIIDOC_FLAGS }-a revnumber=$VERSION -a tabsize=0 -a latexmath" \
21 conf=etc \
22 SRCDIR=. \
23 xsl=docbook-xsl \
24 slidy=slidy2 \
25 $MAKE ${MAKE_FLAGS-} \
26 -f "$tool"/lib/tool/asciidoc/GNUmakefile \
27 "$@"