Build system: add test for econometrica bibtex style (necessary for userguide)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2948 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
af2e195d56
commit
fa1fcfc800
24
configure.ac
24
configure.ac
|
@ -77,6 +77,26 @@ 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
|
||||
AC_MSG_CHECKING([for econometrica BST])
|
||||
AX_LATEX_BIBTEX_TEST([\documentclass{article}
|
||||
\begin{document}
|
||||
\cite{Juillard1996}
|
||||
\bibliography{conftest}
|
||||
\bibliographystyle{econometrica}
|
||||
\end{document}
|
||||
], [@techreport{Juillard1996,
|
||||
Author = {Juillard, Michel},
|
||||
Institution = {CEPREMAP},
|
||||
Number = {9602},
|
||||
Title = {Dynare : a program for the resolution and simulation of dynamic models with forward variables through the use of a relaxation algorithm},
|
||||
Type = {CEPREMAP working papers},
|
||||
Year = {1996}}
|
||||
], [ax_latex_have_econometrica])
|
||||
AC_MSG_RESULT([$ax_latex_have_econometrica])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_ECONOMETRICA], [test "x$ax_latex_have_econometrica" = "xyes"])
|
||||
|
||||
AC_CHECK_PROG([DBLATEX], [dblatex], [dblatex])
|
||||
AM_CONDITIONAL([HAVE_DBLATEX], [test "x$DBLATEX" != "x"])
|
||||
|
||||
|
@ -199,10 +219,10 @@ else
|
|||
BUILD_DYNARE_PDF_MANUAL="no (missing one of: pdflatex, dblatex)"
|
||||
fi
|
||||
|
||||
if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
|
||||
if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x" -a "x$ax_latex_have_econometrica" = "xyes"; then
|
||||
BUILD_DYNARE_USERGUIDE="yes"
|
||||
else
|
||||
BUILD_DYNARE_USERGUIDE="no (missing one of: pdflatex, bibtex)"
|
||||
BUILD_DYNARE_USERGUIDE="no (missing one of: pdflatex, bibtex, econometrica BST)"
|
||||
fi
|
||||
|
||||
if test "x$PDFLATEX" != "x"; then
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
if HAVE_PDFLATEX
|
||||
if HAVE_BIBTEX
|
||||
if HAVE_ECONOMETRICA
|
||||
pdf-local: UserGuide.pdf
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
SRC = UserGuide.tex Graphics/DynareTitle.pdf DynareBib.bib \
|
||||
ch-intro.tex ch-inst.tex ch-solbase.tex ch-soladv.tex ch-estbase.tex \
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# ===========================================================================
|
||||
# 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_BIBTEX_TEST(FILEDATA,BIBDATA,VARIABLETOSET,[NOCLEAN])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macros creates a bib file called contest.bib with BIBDATA,
|
||||
# executes the latex application with FILEDATA as input, then runs
|
||||
# bibtex on the resulting aux file, and finally sets VARIABLETOSET
|
||||
# to yes or no depending on the result. If NOCLEAN is set, the folder
|
||||
# used for the test is not deleted after testing.
|
||||
#
|
||||
# The macro assumes that the variables PDFLATEX and BIBTEX are set.
|
||||
#
|
||||
# Adapted from the macro AX_LATEX_TEST by Sébastien Villemot.
|
||||
#
|
||||
# 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_BIBTEX_TEST],[
|
||||
rm -rf conftest.dir/.acltx
|
||||
AS_MKDIR_P([conftest.dir/.acltx])
|
||||
cd conftest.dir/.acltx
|
||||
m4_ifval([$3],[$3="no"; export $3;])
|
||||
cat > conftest.tex << ACLEOF
|
||||
$1
|
||||
ACLEOF
|
||||
cat > conftest.bib << ACLEOF
|
||||
$2
|
||||
ACLEOF
|
||||
$PDFLATEX conftest 2>&1 1>output
|
||||
$BIBTEX conftest 2>&1 1>output2 m4_ifval([$3],[&& $3=yes])
|
||||
cd ..
|
||||
cd ..
|
||||
sed 's/^/| /' conftest.dir/.acltx/conftest.tex >&5
|
||||
echo "$as_me:$LINENO: executing $PDFLATEX conftest" >&5
|
||||
sed 's/^/| /' conftest.dir/.acltx/output >&5
|
||||
echo "$as_me:$LINENO: executing $BIBTEX conftest" >&5
|
||||
sed 's/^/| /' conftest.dir/.acltx/output2 >&5
|
||||
m4_ifval([$4],,[rm -rf conftest.dir/.acltx])
|
||||
])
|
|
@ -15,7 +15,7 @@
|
|||
# DESCRIPTION
|
||||
#
|
||||
# This macros execute the pdftex application with FILEDATA as input and set
|
||||
# VARIABLETOSET the yes or no depending of the result if NOCLEAN is set,
|
||||
# VARIABLETOSET to yes or no depending on the result. If NOCLEAN is set,
|
||||
# the folder used for the test is not delete after testing.
|
||||
#
|
||||
# The macro assumes that the variable PDFTEX is set.
|
||||
|
@ -52,7 +52,7 @@ cat conftest.tex | $PDFTEX 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 | $latex" >&5
|
||||
echo "$as_me:$LINENO: executing cat conftest.tex | $PDFTEX" >&5
|
||||
sed 's/^/| /' conftest.dir/.acltx/output >&5
|
||||
m4_ifval([$3],,[rm -rf conftest.dir/.acltx])
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue