build system: integrate documentation
parent
3fc2947951
commit
c2923b0383
|
@ -48,3 +48,15 @@ ar-lib
|
|||
|
||||
# macOS stuff
|
||||
.DS_Store
|
||||
|
||||
# Doc rules
|
||||
*.pdf
|
||||
*.aux
|
||||
*.log
|
||||
*.nav
|
||||
*.out
|
||||
*.snm
|
||||
*.toc
|
||||
*.vrb
|
||||
!/doc/macroprocessor/new-design.pdf
|
||||
!/doc/macroprocessor/old-design.pdf
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = src
|
||||
SUBDIRS = src doc
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
|
|
28
configure.ac
28
configure.ac
|
@ -80,9 +80,23 @@ AC_DEFINE([BOOST_NO_HASH], [], [Don't use deprecated STL hash structures])
|
|||
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x"])
|
||||
|
||||
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex])
|
||||
AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])
|
||||
|
||||
AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex])
|
||||
AM_CONDITIONAL([HAVE_BIBTEX], [test "x$BIBTEX" != "x"])
|
||||
|
||||
if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
|
||||
AX_LATEX_CLASS([beamer], [ax_latex_have_beamer])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_BEAMER], [test "x$ax_latex_have_beamer" = "xyes"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
src/Makefile
|
||||
src/macro/Makefile
|
||||
doc/Makefile
|
||||
doc/preprocessor/Makefile
|
||||
doc/macroprocessor/Makefile
|
||||
])
|
||||
|
||||
if test "x$DOXYGEN" != "x"; then
|
||||
|
@ -91,15 +105,25 @@ else
|
|||
BUILD_DYNARE_PREPROC_DOC="no (missing doxygen)"
|
||||
fi
|
||||
|
||||
|
||||
if test "x$PDFLATEX" != "x" -a "x$ax_latex_have_beamer" = "xyes"; then
|
||||
BUILD_BEAMER_DOC="yes"
|
||||
else
|
||||
BUILD_BEAMER_DOC="no (missing one of: pdflatex, beamer)"
|
||||
fi
|
||||
|
||||
AC_MSG_NOTICE([
|
||||
|
||||
The Dynare Preprocessor is now configured to build...
|
||||
|
||||
Binaries (with "make")
|
||||
Dynare preprocessor: yes
|
||||
Dynare preprocessor: yes
|
||||
|
||||
PDF documentation (with "make pdf"):
|
||||
Preprocessor & Macroprocessor presentations: $BUILD_BEAMER_DOC
|
||||
|
||||
HTML documentation (with "make html"):
|
||||
Dynare preprocessor developer doc: $BUILD_DYNARE_PREPROC_DOC
|
||||
Dynare preprocessor developer doc: $BUILD_DYNARE_PREPROC_DOC
|
||||
|
||||
])
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
SUBDIRS = preprocessor macroprocessor
|
||||
|
||||
PDF_TARGETS =
|
||||
|
||||
pdf-local: $(PDF_TARGETS)
|
|
@ -21,6 +21,11 @@ Copyright: 2008 Thomas Porschberg <thomas@randspringer.de>
|
|||
2009 Peter Adolphs
|
||||
License: permissive-autoconf
|
||||
|
||||
Files: m4/ax_latex_class.m4 m4/ax_tex_test.m4
|
||||
Copyright: 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
2009 Dynare Team
|
||||
License: LGPL-2.1+
|
||||
|
||||
License: GPL-3+
|
||||
Dynare is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
# ===========================================================================
|
||||
# http://www.nongnu.org/autoconf-archive/ax_latex_class.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# OBSOLETE MACRO
|
||||
#
|
||||
# Deprecated because of licensing issues. The Lesser GPL imposes licensing
|
||||
# restrictions on the generated configure script unless it is augmented
|
||||
# with an Autoconf Exception clause.
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_LATEX_CLASS(CLASSNAME,VARIABLETOSET[,ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macros test is class CLASSNAME exists and work and set
|
||||
# VARIABLETOSET to yes or no If ACTION-IF-FOUND (and ACTION-IF-NOT-FOUND)
|
||||
# are set, do the correct action
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
# Copyright (c) 2009 Dynare Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_LATEX_CLASS],[
|
||||
AC_CACHE_CHECK([for usability of class $1],[ac_cv_latex_class_]translit($1,[-],[_]),[
|
||||
AX_LATEX_TEST([\documentclass{$1}
|
||||
\begin{document}
|
||||
\end{document}],[ac_cv_latex_class_]translit($1,[-],[_]))
|
||||
])
|
||||
$2=$[ac_cv_latex_class_]translit($1,[-],[_]) ; export $2;
|
||||
AC_SUBST($2)
|
||||
ifelse($#,2,[],$#,3,[
|
||||
if test "[$]$2" = "yes" ;
|
||||
then
|
||||
$3
|
||||
fi
|
||||
],$#,4,[
|
||||
ifelse($3,[],[
|
||||
if test "[$]$2" = "no" ;
|
||||
then
|
||||
$4
|
||||
fi
|
||||
],[
|
||||
if test "[$]$2" = "yes" ;
|
||||
then
|
||||
$3
|
||||
else
|
||||
$4
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
])
|
|
@ -0,0 +1,56 @@
|
|||
# ===========================================================================
|
||||
# http://www.nongnu.org/autoconf-archive/ax_latex_test.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# OBSOLETE MACRO
|
||||
#
|
||||
# Deprecated because of licensing issues. The Lesser GPL imposes licensing
|
||||
# restrictions on the generated configure script unless it is augmented
|
||||
# with an Autoconf Exception clause.
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_LATEX_TEST(FILEDATA,VARIABLETOSET,[NOCLEAN])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macros execute the latex application with FILEDATA as input and set
|
||||
# VARIABLETOSET the yes or no depending of the result if NOCLEAN is set,
|
||||
# the folder used for the test is not delete after testing.
|
||||
#
|
||||
# The macro assumes that the variable PDFLATEX is set.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
# Copyright (c) 2009 Dynare Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_LATEX_TEST],[
|
||||
rm -rf conftest.dir/.acltx
|
||||
AS_MKDIR_P([conftest.dir/.acltx])
|
||||
cd conftest.dir/.acltx
|
||||
m4_ifval([$2],[$2="no"; export $2;])
|
||||
cat > conftest.tex << ACLEOF
|
||||
$1
|
||||
ACLEOF
|
||||
cat conftest.tex | $PDFLATEX 2>&1 1>output m4_ifval([$2],[&& $2=yes])
|
||||
cd ..
|
||||
cd ..
|
||||
sed 's/^/| /' conftest.dir/.acltx/conftest.tex >&5
|
||||
echo "$as_me:$LINENO: executing cat conftest.tex | $PDFLATEX" >&5
|
||||
sed 's/^/| /' conftest.dir/.acltx/output >&5
|
||||
m4_ifval([$3],,[rm -rf conftest.dir/.acltx])
|
||||
])
|
Loading…
Reference in New Issue