diff --git a/Make.inc.in b/Make.inc.in index d1b3fcd6ace3c..537e1131921dd 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -182,3 +182,4 @@ PANDOC := @PANDOC@ PANDOC_ENGINE := @PANDOC_ENGINE@ DOXYGEN := @DOXYGEN@ GRAPHVIZ_DOT := @GRAPHVIZ_DOT@ +ANTORA := @ANTORA@ diff --git a/configure b/configure index adda1bf6f0e97..76853cff755fd 100755 --- a/configure +++ b/configure @@ -692,6 +692,7 @@ build_os build_vendor build_cpu build +ANTORA GRAPHVIZ_DOT DOXYGEN PERL @@ -2911,6 +2912,51 @@ else $as_echo "$as_me: WARNING: doxygen not found - Please install if you want build the docs/source" >&2;} fi +# Extract the first word of "antora", so it can be a program name with args. +set dummy antora; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ANTORA+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ANTORA in + [\\/]* | ?:[\\/]*) + ac_cv_path_ANTORA="$ANTORA" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ANTORA="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ANTORA=$ac_cv_path_ANTORA +if test -n "$ANTORA"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANTORA" >&5 +$as_echo "$ANTORA" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_cv_path_ANTORA" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: antora not found - Please install if you want build the site" >&5 +$as_echo "$as_me: WARNING: antora not found - Please install if you want build the site" >&2;} +fi + # Check whether --enable-developer was given. if test "${enable_developer+set}" = set; then : enableval=$enable_developer; case "$enableval" in diff --git a/configure.ac b/configure.ac index 3d6f50fe8206c..f2d7ecc3f5656 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,14 @@ else AC_MSG_WARN([doxygen not found - Please install if you want build the docs/source]) fi +dnl # +dnl # check for Antora +dnl # +AC_PATH_PROG(ANTORA, antora) +if test "x$ac_cv_path_ANTORA" = "x"; then + AC_MSG_WARN([antora not found - Please install if you want build the site]) +fi + dnl # dnl # Enable developer features like debugging symbols. dnl # These checks must be done before expanding the AC_PROG_CC diff --git a/doc/all.mk b/doc/all.mk index 2b4aae4368be5..2ab7201e23666 100644 --- a/doc/all.mk +++ b/doc/all.mk @@ -6,7 +6,7 @@ # to fix that. So, only run those shell scripts if we're going to # build the documentation. # -WITH_DOC := $(strip $(foreach x,doc html pdf doxygen,$(findstring $(x),$(MAKECMDGOALS)))) +WITH_DOC := $(strip $(foreach x,doc html docsite pdf doxygen,$(findstring $(x),$(MAKECMDGOALS)))) ifneq "$(WITH_DOC)" "" # @@ -23,6 +23,13 @@ ifeq "$(PANDOC)" "" $(error pandoc is required to build the documentation) endif +# +# We're building a documentation target, but there's no "antora". +# +ifeq "$(ANTORA)" "" +$(error antora is required to build the documentation) +endif + # # We're installing the documentation, but there's no "docdir". # @@ -32,12 +39,10 @@ $(error 'docdir' is required to do 'make install') endif endif -BUILD_DOC := $(strip $(foreach x,doc html pdf adoc install.doc clean,$(findstring $(x),$(MAKECMDGOALS)))) - # # TODO: The 'pdf' target is broken. we should enable here soon. # -all.doc: html +all.doc: html docsite install: install.doc @@ -89,7 +94,7 @@ install.doc: $(addprefix $(R)/$(docdir)/,$(ALL_DOC_FILES)) .PHONY: clean.doc clean.doc: ${Q}rm -f doc/*~ doc/rfc/*~ doc/examples/*~ $(AUTO_ADOC_FILES) $(HTML_FILES) $(PDF_FILES) - ${Q}rm -rf $(DOXYGEN_HTML_DIR) + ${Q}rm -rf $(DOXYGEN_HTML_DIR) $(BUILD_DIR)/site .PHONY: tests.doc tests.doc: @@ -125,6 +130,11 @@ all.doc: doxygen endif endif +.PHONY: docsite +docsite: + @echo ANTORA site.yml + ${Q}$(ANTORA) site.yml + # # Markdown files get converted to asciidoc via pandoc. # @@ -191,7 +201,7 @@ doc/%.pdf: doc/%.md -V papersize=letter \ --template=./scripts/asciidoc/freeradius.template -o $@ $< -.PHONY: asciidoc html pdf clean clean.doc +.PHONY: asciidoc html docsite pdf clean clean.doc asciidoc: $(ADOC_FILES) html: $(HTML_FILES) pdf: $(PDF_FILES)