@@ -2782,8 +2782,14 @@ DEFAULT_MAN_DIR_AS_BASE='m4nut_DEFAULT_MAN_DIR_AS_BASE'
27822782
27832783case "${target_os}" in
27842784 solaris*|sunos*|SunOS*|illumos*)
2785- dnl Note: this regards target OS standard layout
2785+ dnl Note: this regards target OS standard layout as documented in
2786+ dnl https://docs.oracle.com/cd/E23824_01/html/821-1451/gladp.html
27862787 dnl but may not fit certain packaging projects
2788+ dnl FIXME https://github.com/networkupstools/nut/issue/3314 :
2789+ dnl If we have no tools or wish to build man pages, and would
2790+ dnl just deliver what we have in dist tarball (or otherwise), we
2791+ dnl must keep the original names and cross-links of files we copy
2792+ dnl (no section substitutions then!)
27872793 DEFAULT_MAN_SECTION_CMD_SYS="1m"
27882794 DEFAULT_MAN_DIR_AS_BASE="no"
27892795 ;;
@@ -4123,6 +4129,11 @@ dnl not fail if we have no tools to generate it (so add to SKIP list).
41234129 ( 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
41244130 rm -f "${DOCTESTDIR}"/snmp-ups.8
41254131 fi
4132+ if test x"${can_build_doc_man}" != xyes && test x"${have_disted_doc_man}" = xyes && test x"${nut_doc_build_target_flag}" != xno ; then
4133+ dnl https://github.com/networkupstools/nut/issue/3314
4134+ AC_MSG_NOTICE ( [ Seems we can not build man pages, but have some pre-built ones...] )
4135+ dnl want_disted_doc_man=yes
4136+ fi
41264137 can_install_doc_man=no
41274138 if test "${want_disted_doc_man}" = yes && ( test "${have_disted_doc_man}" = yes || test "${have_disted_doc_man}" = yes-placeholder ) ; then
41284139 AC_MSG_NOTICE ( [ Requested, and can, install pre-built distributed copies of ${nut_doc_build_target_base} documentation] )
@@ -4155,6 +4166,9 @@ dnl not fail if we have no tools to generate it (so add to SKIP list).
41554166 if test "${have_disted_doc_man}" = yes || test "${have_disted_doc_man}" = yes-placeholder ; then
41564167 AC_MSG_WARN ( [ Unable to build ${nut_doc_build_target_base} documentation, but can install pre-built distributed copies] )
41574168 DOC_INSTALL_DISTED_MANS="yes"
4169+ dnl Avoid rebuilding existing build products due to their timestamp dependencies;
4170+ dnl ignore "touch" errors due to e.g. read-only sources (distcheck, ISO image, etc.):
4171+ touch -r "${abs_srcdir}"/docs/man/Makefile.am "${abs_srcdir}"/docs/man/*.{1,2,3,4,5,6,7,8,9}* "${abs_srcdir}"/docs/man/*.{txt,xml,html,pdf} || true
41584172 can_install_doc_man=yes
41594173 else
41604174 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] )
0 commit comments