Skip to content

Commit ef31eaa

Browse files
committed
Don't try to build manpages if asciidoc is missing
Commit f9157fd changed the rules for the documentation, so make always tried to build it and failed if asciidoc was missing since that commit. Now configure tests whether asciidoc is available and builds the documentation conditionally. It also reports that to the user. Signed-off-by: Stefan Weil <[email protected]>
1 parent 4b50f3f commit ef31eaa

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

configure.ac

+21
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,17 @@ AC_SYS_LARGEFILE
414414
415415
AC_CHECK_FUNCS([getline])
416416
417+
# ----------------------------------------
418+
# Check for programs needed to build documentation.
419+
# ----------------------------------------
420+
421+
AC_CHECK_PROG([have_asciidoc], asciidoc, true, false)
422+
if $have_asciidoc; then
423+
AM_CONDITIONAL([ASCIIDOC], true)
424+
else
425+
AM_CONDITIONAL([ASCIIDOC], false)
426+
fi
427+
417428
# ----------------------------------------
418429
# Checks for typedefs, structures, and compiler characteristics.
419430
# ----------------------------------------
@@ -513,6 +524,16 @@ echo "You can now build and install $PACKAGE_NAME by running:"
513524
echo ""
514525
echo "$ make"
515526
echo "$ sudo make install"
527+
echo ""
528+
529+
AM_COND_IF([ASCIIDOC],
530+
[
531+
echo "This will also build the documentation."
532+
], [
533+
echo "Documentation will not be built because asciidoc is missing."
534+
]
535+
)
536+
516537
# echo "$ sudo make install LANGS=\"eng ara deu\""
517538
# echo " Or:"
518539
# echo "$ sudo make install-langs"

doc/Makefile.am

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# doc/Makefile.am
22

3+
if ASCIIDOC
4+
35
asciidoc=asciidoc -d manpage
46

57
man_MANS = \
@@ -28,3 +30,5 @@ man_MANS = \
2830
$(asciidoc) -o $@ $<
2931

3032
MAINTAINERCLEANFILES = $(man_MANS) Doxyfile
33+
34+
endif

0 commit comments

Comments
 (0)