* configure.ac: Check for bib2bib and bibtex2html.
Define BIB2BIB and BIBTEX2HTML and use them...
* doc/Makefile.am (lrde_olena.bib, lrde_olena.html): ...here.
* bootstrap: No longer check for bib2bib and bibtex2html.
---
ChangeLog | 9 +++++++++
bootstrap | 6 ------
configure.ac | 13 +++++++++++++
doc/Makefile.am | 18 ++++++++++++------
4 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e4f81c6..2252234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2013-06-28 Roland Levillain <roland(a)lrde.epita.fr>
+ Have configure find bib2bib and bibtex2html.
+
+ * configure.ac: Check for bib2bib and bibtex2html.
+ Define BIB2BIB and BIBTEX2HTML and use them...
+ * doc/Makefile.am (lrde_olena.bib, lrde_olena.html): ...here.
+ * bootstrap: No longer check for bib2bib and bibtex2html.
+
+2013-06-28 Roland Levillain <roland(a)lrde.epita.fr>
+
Have configure find rst2html.
* configure.ac: Check for rst2html.
diff --git a/bootstrap b/bootstrap
index 9dbc3ab..6b81891 100755
--- a/bootstrap
+++ b/bootstrap
@@ -161,12 +161,6 @@ require doxygen 1.5.6
# with both implementations.
require convert 1.3.12 -version
require hevea 1.10 -version
-# Admittedly a bit hacky, but these tools
-# 1. display their version numbers on stderr, not stdout; and
-# 2. contain a digit ("2") in their name, which disturbs `require'.
-require bibtex2html 1.95 "--version 2>&1 | sed
's/bibtex2html//'"
-require bib2bib 1.95 "--version 2>&1 | sed 's/bib2bib//'"
-
# Regen files stored in the repository if asked so.
if $regen_p; then
diff --git a/configure.ac b/configure.ac
index 8c6b59c..665b33e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,6 +178,19 @@ if test -z "$RST2HTML"; then
AC_MSG_WARN([rst2html not found, documentation rebuild will not be possible])
fi
+AC_ARG_VAR([BIB2BIB], [BibTeX extracting tool])
+AC_CHECK_PROGS([BIB2BIB], [bib2bib])
+if test -z "$BIB2BIB"; then
+ AC_MSG_WARN([bib2bib not found, documentation rebuild will not be possible])
+fi
+
+AC_ARG_VAR([BIBTEX2HTML], [BibTeX-to-HTML translator])
+AC_CHECK_PROGS([BIBTEX2HTML], [bibtex2html])
+if test -z "$BIBTEX2HTML"; then
+ AC_MSG_WARN(m4_do([bibtex2html not found,],
+ [ documentation rebuild will not be possible]))
+fi
+
## ------------------------------ ##
## ``Enable Everything'' Switch. ##
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bab9ffb..2ecb26d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -162,19 +162,25 @@ contributors.html: $(top_srcdir)/AUTHORS
## -------------- ##
# Warning: also generates lrde_olena.cite
-lrde_olena.bib:
- bib2bib -s plain -oc lrde_olena.cite -ob lrde_olena.bib -c \
- 'project = "Image" or project = "Olena"' \
- -s year -r $(srcdir)/lrde.bib
+lrde_olena.bib: $(srcdir)/lrde.bib
+ @test -n "$(BIB2BIB)" \
+ || { echo "error: bib2bib not found during configure" >&2; \
+ exit 1; }
+ $(BIB2BIB) -s plain -oc lrde_olena.cite -ob $@ \
+ -c 'project = "Image" or project = "Olena"' \
+ -s year -r $<
# Warning: also generates lrde_olena_bib.html
lrde_olena.html: lrde_olena.bib
+ @test -n "$(BIBTEX2HTML)" \
+ || { echo "error: bibtex2html not found during configure" >&2; \
+ exit 1; }
# Use the current directory for temporary files, as TeXlive (2012)
# prevents bibtex2html from running bibtex in a temporary directory on
# Mac OS X (see
https://www.lri.fr/~filliatr/bibtex2html/).
- env TMPDIR=. bibtex2html -s plain -nokeywords \
+ env TMPDIR=. $(BIBTEX2HTML) -s plain -nokeywords \
-citefile lrde_olena.cite -noabstract -nofooter -labelname \
- -nodoc -linebreak -nf urllrde PDF lrde_olena.bib
+ -nodoc -linebreak -nf urllrde PDF $<
EXTRA_DIST += \
--
1.7.10.4