Permalink
Browse files

docs: Remove java detection in place of asciidoc engine and cleanup r…

…ef-manual target.
  • Loading branch information...
1 parent b52fd07 commit fc5ee79f05ecb069abae84c274e743099beb9dcf @b1v1r b1v1r committed Feb 1, 2014
Showing with 41 additions and 19 deletions.
  1. +31 −10 configure.ac
  2. +4 −5 docs/Makefile.am
  3. +6 −4 docs/reference-manual/Makefile.am
View
@@ -316,18 +316,38 @@ for f in $INTERNAL_DOXYGEN_FILES; do
DOXYGEN_INTERNAL_DEPS="$DOXYGEN_INTERNAL_DEPS \$(abs_top_srcdir)/$f"
done
-### Java
-AC_ARG_WITH([java],
- [ --with-java=PROG java executable],
- [java="$withval"],[java=no])
+### Asciidoc executable and options
+AC_ARG_WITH([asciidoc],
+ [ --with-asciidoc=PROG asciidoc engine executable],
+ [asciidoc="$withval"],[asciidoc=yes])
+
+if test "$asciidoc" = "yes"; then
+ AC_PATH_PROGS([asciidoc],[asciidoctor asciidoc],[])
+elif test "$asciidoc" != "no"; then
+ AC_MSG_NOTICE([Using asciidoc: $asciidoc])
+else
+ asciidoc=
+ AC_MSG_NOTICE([Not using asciidoc: no engine found])
+fi
+
+ASCIIDOC=$asciidoc
+
+AC_ARG_WITH([asciidoc_options],
+ [ --with-asciidoc-options=OPTIONS asciidoc engine options],
+ [asciidoc_options="$withval"],[asciidoc_options=yes])
-if test "$java" != "no"; then
- AC_MSG_NOTICE([Using java: $java])
+if test "$asciidoc_options" = "yes"; then
+ asciidoc_options="-b html5"
+ AC_MSG_NOTICE([Using default asciidoc options: $asciidoc_options])
+elif test "$asciidoc_options" != "no"; then
+ AC_MSG_NOTICE([Using asciidoc options: $asciidoc_options])
else
- AC_PATH_PROGS([java],[java],[])
+ asciidoc_options=
fi
-JAVA=$java
+ASCIIDOC_OPTIONS=$asciidoc_options
+
+AM_CONDITIONAL([ENABLE_REFMANUAL], test -n "$ASCIIDOC"])
### Valgrind
AC_ARG_WITH([valgrind],
@@ -628,8 +648,6 @@ AC_SUBST(CONFIG_MACRO_DIR)
AC_SUBST(TOPLEVEL_SUBDIRS)
AC_SUBST(LIBS_SUBDIRS)
AC_SUBST(SERVERS_SUBDIRS)
-AC_SUBST(JAVA)
-AC_SUBST(VALGRIND)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_LDFLAGS)
AC_SUBST(IB_DEBUG)
@@ -638,6 +656,9 @@ AC_SUBST(DOXYGEN_EXTERNAL_DEPS)
AC_SUBST(DOXYGEN_INTERNAL_DEPS)
AC_SUBST(DOXYGEN_INPUT)
AC_SUBST(DOXYGEN_TOP)
+AC_SUBST(ASCIIDOC)
+AC_SUBST(ASCIIDOC_OPTIONS)
+AC_SUBST(VALGRIND)
AC_SUBST(BOOST_SUFFIX)
AC_SUBST(MAJOR_VERSION, [$AX_MAJOR_VERSION])
AC_SUBST(MINOR_VERSION, [$AX_MINOR_VERSION])
View
@@ -19,19 +19,18 @@ doxygen_external: external.doxy $(DOXYGEN_DEPS)
fi;
doxygen_internal.pdf: doxygen_internal
- (cd doxygen_internal/latex && make refman.pdf) && cp doxygen/latex/refman.pdf doxygen_internal.pdf
+ @(cd doxygen_internal/latex && make refman.pdf) && cp doxygen/latex/refman.pdf doxygen_internal.pdf
doxygen_external.pdf: doxygen_external
- (cd doxygen_external/latex && make refman.pdf) && cp doxygen/latex/refman.pdf doxygen_external.pdf
+ @(cd doxygen_external/latex && make refman.pdf) && cp doxygen/latex/refman.pdf doxygen_external.pdf
doxygen: doxygen_internal doxygen_external
ref-manual:
- @(cd reference-manual && $(MAKE) ironbee-reference-manual.html)
+ @(cd reference-manual && $(MAKE) ref-manual)
.PHONY: \
doxygen \
doxygen_internal \
doxygen_external \
- manual \
- ref-manual
+ ref-manual
@@ -1,13 +1,15 @@
CLEANFILES = *.html
DOCVERSION = $(VERSION)
-# TODO: Add detection to autoconf
-ASCIIDOC = asciidoc
+ref-manual: $(abs_builddir)/ironbee-reference-manual.html
-ironbee-reference-manual.html: $(abs_srcdir)/*.adoc
+$(abs_builddir)/ironbee-reference-manual.html: $(abs_top_srcdir)/VERSION $(abs_srcdir)/*.adoc
@if test -n "$(ASCIIDOC)"; then \
echo "Processing ironbee-reference-manual.adoc ..."; \
- (cd $(abs_srcdir) && $(ASCIIDOC) -a revnumber=$(DOCVERSION) -o $(abs_builddir)/ironbee-reference-manual.html ironbee-reference-manual.adoc && echo "Wrote $(abs_builddir)/ironbee-reference-manual.html"); \
+ (cd $(abs_srcdir) && $(ASCIIDOC) -a revnumber=$(DOCVERSION) $(ASCIIDOC_OPTIONS) -o $(abs_builddir)/ironbee-reference-manual.html ironbee-reference-manual.adoc && echo "Wrote $(abs_builddir)/ironbee-reference-manual.html"); \
else \
echo "You need asciidoc installed to build the reference manual."; \
fi;
+
+.PHONY: \
+ ref-manual

0 comments on commit fc5ee79

Please sign in to comment.