Commit 05330efe authored by Ondřej Surý's avatar Ondřej Surý

Autotoolize documentation build process

parent 79730295
...@@ -9,6 +9,7 @@ Knot.creator.user* ...@@ -9,6 +9,7 @@ Knot.creator.user*
Makefile Makefile
Makefile.in Makefile.in
aclocal.m4 aclocal.m4
ar-lib
autoscan.log autoscan.log
config.guess config.guess
config.sub config.sub
......
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src samples SUBDIRS = src samples @DOC@
...@@ -9,6 +9,9 @@ AC_CONFIG_MACRO_DIR([m4]) ...@@ -9,6 +9,9 @@ AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS([_GNU_SOURCE]) AC_USE_SYSTEM_EXTENSIONS([_GNU_SOURCE])
AX_EXT AX_EXT
# Checks for programs.
AC_PROG_CC
# Enable maintainer mode by default for development # Enable maintainer mode by default for development
AM_MAINTAINER_MODE([enable]) AM_MAINTAINER_MODE([enable])
...@@ -16,9 +19,6 @@ AM_MAINTAINER_MODE([enable]) ...@@ -16,9 +19,6 @@ AM_MAINTAINER_MODE([enable])
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
LT_INIT LT_INIT
# Checks for programs.
AC_PROG_CC
AC_CACHE_CHECK([for reentrant lex], [ac_cv_path_LEX], AC_CACHE_CHECK([for reentrant lex], [ac_cv_path_LEX],
[AC_PATH_PROGS_FEATURE_CHECK([LEX], [$LEX flex gflex], [AC_PATH_PROGS_FEATURE_CHECK([LEX], [$LEX flex gflex],
[cat >conftest.l <<_ACEOF [cat >conftest.l <<_ACEOF
...@@ -45,6 +45,24 @@ rm -f conftest.l lexyy.c lex.yy.c ...@@ -45,6 +45,24 @@ rm -f conftest.l lexyy.c lex.yy.c
AC_SUBST([LEX], [$ac_cv_path_LEX]) AC_SUBST([LEX], [$ac_cv_path_LEX])
AM_PROG_LEX AM_PROG_LEX
# Check for tools needed to compile used documentation
AC_ARG_VAR([XMLTO], [path to xmlto processor to generate a HTML documentation])
#AC_ARG_VAR([DBLATEX], [path to dblatex process to generate a PDF documentation])
AC_ARG_WITH([documentation],
[AS_HELP_STRING([--with-documentation @<:@default=no@:>@],
[enable building of the user documentation])],
[],
[with_documentation=no])
XMLTO=
AS_IF([test "x$with_documentation" != "xno"],
[AC_CHECK_PROG([XMLTO], [xmlto], [xmlto],
[AC_MSG_ERROR([xmlto needed for building the documentation])])
# AC_PATH_PROG([DBLATEX], [dblatex],
# [AC_MSG_ERROR([dblatex needed for building the documentation])])
AC_SUBST([DOC], [doc])
])
AC_PROG_YACC AC_PROG_YACC
YACC_BISON=`bison --version | awk '{print $1;exit}'` YACC_BISON=`bison --version | awk '{print $1;exit}'`
if test "$YACC_BISON" != "bison"; then if test "$YACC_BISON" != "bison"; then
......
XML_SOURCES=knot.xml configuration.xml installation.xml introduction.xml knot.xml migration.xml reference.xml resources.xml security.xml troubleshooting.xml
all: knot.html knot.pdf
knot.pdf: $(XML_SOURCES)
xmlto --with-dblatex --skip-validation pdf knot.xml
knot.html: $(XML_SOURCES)
xmlto --skip-validation html-nochunks knot.xml
clean:
rm -f *.proc *.pdf *.html
XMLTO=@XMLTO@
XMLTO_FLAGS=--skip-validation
XML_SOURCES=configuration.xml \
installation.xml \
introduction.xml \
migration.xml \
reference.xml \
resources.xml \
security.xml \
troubleshooting.xml
htmldir = $(prefix)/share/doc/@PACKAGE@
dist_html_DATA = @PACKAGE@.html
@PACKAGE@.html: @PACKAGE@.xml $(XML_SOURCES)
$(XMLTO) $(XMLTO_FLAGS) html-nochunks @PACKAGE@.xml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment