]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
suppress 'make install' doc if there's no asciidoctor or pandoc
authorAlan T. DeKok <aland@freeradius.org>
Thu, 14 Jan 2021 14:33:29 +0000 (09:33 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 14 Jan 2021 14:33:29 +0000 (09:33 -0500)
doc/all.mk

index 1adde63bb56a60aeb922bcea7cb2cbe296bfd48d..000d753acc70869cc5c3da6d24c3f214b37bdd35 100644 (file)
@@ -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.
 #