From: Alan T. DeKok Date: Thu, 14 Jan 2021 14:33:29 +0000 (-0500) Subject: suppress 'make install' doc if there's no asciidoctor or pandoc X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f774a8a9bd1fee0b0ec7cfa9ef07c72fac25405;p=thirdparty%2Ffreeradius-server.git suppress 'make install' doc if there's no asciidoctor or pandoc --- diff --git a/doc/all.mk b/doc/all.mk index 1adde63bb56..000d753acc7 100644 --- a/doc/all.mk +++ b/doc/all.mk @@ -7,6 +7,26 @@ # build the documentation. # WITH_DOC := $(strip $(foreach x,install doc html man pdf doxygen,$(findstring $(x),$(MAKECMDGOALS)))) +# +# 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. +# +ifeq "$(ASCIIDOCTOR)" "" +WITH_DOC= +endif +ifeq "$(PANDOC)" "" +WITH_DOC= +endif + +endif + ifneq "$(WITH_DOC)" "" # @@ -33,15 +53,6 @@ $(error antora is required to build the documentation) endif endif -# -# We're installing the documentation, but there's no "docdir". -# -ifeq "$(docdir)" "no" -ifneq "$(findstring install,$(WITH_DOC))" "" -$(error 'docdir' is required to do 'make install') -endif -endif - # # TODO: The 'pdf' target is broken. we should enable here soon. #