Check a2x, asciidoc presence and only build documents when they are

available.
This commit is contained in:
Tatsuhiro Tsujikawa 2010-12-02 23:55:52 +09:00
parent 816be74e61
commit 7a3faa625b
3 changed files with 17 additions and 3 deletions

View file

@ -8,5 +8,7 @@ dist_doc_DATA = README README.asciidoc README.html
dist_noinst_DATA = LICENSE.OpenSSL
if HAVE_ASCIIDOC
README.html: README.asciidoc
/usr/bin/asciidoc -d article -b xhtml11 -n README.asciidoc
@ASCIIDOC@ -d article -b xhtml11 -n README.asciidoc
endif # HAVE_ASCIIDOC

View file

@ -45,6 +45,14 @@ AC_PROG_MKDIR_P
AC_PROG_RANLIB
AC_PROG_YACC
AC_PATH_PROG([A2X], [a2x])
AC_SUBST([A2X])
AM_CONDITIONAL([HAVE_A2X], [ test "x$A2X" != "x" ])
AC_PATH_PROG([ASCIIDOC], [asciidoc])
AC_SUBST([ASCIIDOC])
AM_CONDITIONAL([HAVE_ASCIIDOC], [ test "x$ASCIIDOC" != "x" ])
# Setting language choice
AC_LANG([C++])

View file

@ -6,8 +6,12 @@ dist_doc_xmlrpc_DATA = xmlrpc/aria2mon \
xmlrpc/aria2rpc \
xmlrpc/README.txt
if HAVE_A2X
aria2c.1: aria2c.1.asciidoc
a2x -f manpage aria2c.1.asciidoc
@A2X@ -f manpage aria2c.1.asciidoc
endif # HAVE_A2X
if HAVE_ASCIIDOC
aria2c.1.html: aria2c.1.asciidoc
asciidoc -d manpage -b xhtml11 -a toc -a max-width=55em aria2c.1.asciidoc
@ASCIIDOC@ -d manpage -b xhtml11 -a toc -a max-width=55em aria2c.1.asciidoc
endif # HAVE_ASCIIDOC