From: Alan T. DeKok Date: Mon, 26 Apr 2021 23:18:57 +0000 (-0400) Subject: rearrange rules to skip documentation if pre-requisites are missing X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b2c944249ebb2176db7d00dec025b340c4229a0;p=thirdparty%2Ffreeradius-server.git rearrange rules to skip documentation if pre-requisites are missing --- diff --git a/doc/all.mk b/doc/all.mk index 1eaf9585f19..f3bd5e1c1f8 100644 --- a/doc/all.mk +++ b/doc/all.mk @@ -31,51 +31,32 @@ $(BUILD_DIR)/make/man.mk: $(ADOC2MAN_FILES) | $(BUILD_DIR)/make ALL_INSTALL += $(AUTO_MAN_FILES) # -# We're installing the documentation, but there's no "docdir". -# -ifneq "$(findstring install,$(WITH_DOC))" "" -ifeq "$(docdir)" "no" -$(error 'docdir' is required to do 'make install') -endif - -# -# Skip "make install*" if asciidoctor and pandoc are missing. +# Skip documentation if any of the necessary prerequisites are missing. # ifeq "$(ASCIIDOCTOR)" "" WITH_DOC= endif + ifeq "$(PANDOC)" "" WITH_DOC= endif +ifneq "$(findstring install,$(WITH_DOC))" "" +ifeq "$(docdir)" "no" +WITH_DOC= endif - -ifneq "$(WITH_DOC)" "" - -# -# We're building a documentation target, but there's no "asciidoc". -# -ifeq "$(ASCIIDOCTOR)" "" -$(error asciidoc is required to build the documentation) -endif - -# -# We're building a documentation target, but there's no "pandoc". -# -ifeq "$(PANDOC)" "" -$(error pandoc is required to build the documentation) endif -# -# We're building a documentation target, but there's no "antora". -# Which we ONLY need for "docsite" -# +ifneq "$(findstring docsite,$(WITH_DOC))" "" ifeq "$(ANTORA)" "" -ifneq "$(findstring docsite,$(MAKECMDGOALS))" "" -$(error antora is required to build the documentation) +WITH_DOC= endif endif +# +# If we still decide to build the documentation, then add in all of the documentation rules. +# +ifneq "$(WITH_DOC)" "" # # TODO: The 'pdf' target is broken. we should enable here soon. # @@ -317,4 +298,5 @@ pdf: $(PDF_FILES) doc: build/docsite/sitemap.xml $(HTML_FILES) +# end of WITH_DOC endif