You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configure.ac
+44-9Lines changed: 44 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2486,6 +2486,8 @@ dnl the usual builds can pass by default on systems without asciidoc.
2486
2486
NUT_ARG_WITH([docs], [build and install documentation (alias to --with-doc)], [man=auto])
2487
2487
NUT_ARG_WITH([doc], [build and install documentation (see docs/configure.txt for many variants of the option)], [${nut_with_docs}])
2488
2488
2489
+
NUT_ARG_ENABLE([docs-man-for-progs-built-only], [build and install man pages (if enabled) only for built programs (yes, default) or all known pages (no)], [yes])
2490
+
2489
2491
dnl Different OS distributions have different layouts of man page section
2490
2492
dnl numbers. The one we treat as default seems to be most wide-spread, in
2491
2493
dnl Linux and FreeBSD. For others, there are other defaults (see `man man`
@@ -3616,6 +3618,7 @@ dnl (so enable the Makefile recipes for those targets if tools are available)
3616
3618
NUT_CHECK_ASCIIDOC
3617
3619
3618
3620
DOC_INSTALL_DISTED_MANS=no
3621
+
DOC_INSTALL_SELECTED_MANS=""
3619
3622
KNOWN_UNABLE_MANS=no
3620
3623
3621
3624
case "${nut_with_doc}" in
@@ -3691,12 +3694,14 @@ for nut_doc_build_target in $nut_doc_build_list; do
3691
3694
nut_doc_build_target_flag="yes"
3692
3695
;;
3693
3696
esac
3697
+
3694
3698
case "${nut_doc_build_target_flag}" in
3695
3699
yes|no|auto|skip|dist-auto) ;;
3696
3700
"") nut_doc_build_target_flag="yes" ;;
3697
3701
*) rm -rf "${DOCTESTDIR}"
3698
3702
AC_MSG_ERROR([Invalid documentation format option: ${nut_doc_build_target}]) ;;
3699
3703
esac
3704
+
3700
3705
AC_MSG_CHECKING([desire and ability to build ${nut_doc_build_target_base} documentation])
3701
3706
AC_MSG_RESULT([${nut_doc_build_target_flag}])
3702
3707
@@ -3786,19 +3791,22 @@ dnl not fail if we have no tools to generate it (so add to SKIP list).
3786
3791
dnl Experimental support for --with-doc=man=dist-auto to prefer pre-disted docs if available, below
3787
3792
AC_MSG_CHECKING([if we can build ${nut_doc_build_target_base}])
3788
3793
can_build_doc_man=no
3789
-
if test x"${nut_doc_build_target}" = x"man=dist-auto" || test "${nut_doc_build_target_flag}" = "dist-auto"; then
3794
+
if test x"${nut_doc_build_target}" = x"man=dist-auto" || test x"${nut_doc_build_target_flag}" = x"dist-auto"; then
3790
3795
want_disted_doc_man=yes
3791
3796
fi
3792
3797
if test "${nut_have_asciidoc}" = yes ; then
3793
3798
( cd "$DOCTESTDIR" && ${A2X} --format manpage --destination-dir=. --xsltproc-opts="--nonet" "${abs_srcdir}"/docs/man/snmp-ups.txt && test -s snmp-ups.8 ) && can_build_doc_man=yes
3794
3799
rm -f "${DOCTESTDIR}"/snmp-ups.8
3795
3800
fi
3801
+
can_install_doc_man=no
3796
3802
if test "${want_disted_doc_man}" = yes && ( test "${have_disted_doc_man}" = yes || test "${have_disted_doc_man}" = yes-placeholder ) ; then
3797
3803
AC_MSG_NOTICE([Requested, and can, install pre-built distributed copies of ${nut_doc_build_target_base} documentation])
if test "${nut_doc_build_target_flag}" = "auto" || test "${nut_doc_build_target_flag}" = "dist-auto" ; then
3827
+
case "${nut_doc_build_target_flag}" in
3828
+
no|skip) ;;
3829
+
auto|dist-auto)
3819
3830
if test "${have_disted_doc_man}" = yes || test "${have_disted_doc_man}" = yes-placeholder ; then
3820
3831
AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation, but can install pre-built distributed copies])
3821
3832
DOC_INSTALL_DISTED_MANS="yes"
3833
+
can_install_doc_man=yes
3822
3834
else
3823
-
AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation, and unable to install pre-built distributed copies because they are absent])
3835
+
AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation, and unable to install pre-built distributed copies because they are absent; will reflect on this below])
3824
3836
fi
3825
-
fi # Other variants include "no", "skip"...
3837
+
;;
3838
+
*)
3839
+
AC_MSG_ERROR([Unexpected flag value '${nut_doc_build_target_flag}' for ${nut_doc_build_target_base} documentation])
3840
+
;;
3841
+
esac
3826
3842
fi
3827
3843
fi
3828
3844
fi
3845
+
3846
+
if test "${can_install_doc_man}" = yes ; then
3847
+
case "${nut_enable_docs_man_for_progs_built_only}" in
3848
+
yes)
3849
+
dnl Legacy default for auto builds: build/deliver only mans for built progs:
0 commit comments