Skip to content
Snippets Groups Projects
Commit 05330efe authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Autotoolize documentation build process

parent 79730295
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ Knot.creator.user*
Makefile
Makefile.in
aclocal.m4
ar-lib
autoscan.log
config.guess
config.sub
......
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src samples
SUBDIRS = src samples @DOC@
......@@ -9,6 +9,9 @@ AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS([_GNU_SOURCE])
AX_EXT
# Checks for programs.
AC_PROG_CC
# Enable maintainer mode by default for development
AM_MAINTAINER_MODE([enable])
......@@ -16,9 +19,6 @@ AM_MAINTAINER_MODE([enable])
AC_PROG_LIBTOOL
LT_INIT
# Checks for programs.
AC_PROG_CC
AC_CACHE_CHECK([for reentrant lex], [ac_cv_path_LEX],
[AC_PATH_PROGS_FEATURE_CHECK([LEX], [$LEX flex gflex],
[cat >conftest.l <<_ACEOF
......@@ -45,6 +45,24 @@ rm -f conftest.l lexyy.c lex.yy.c
AC_SUBST([LEX], [$ac_cv_path_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
YACC_BISON=`bison --version | awk '{print $1;exit}'`
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment