diff --git a/INSTALL.nut.adoc b/INSTALL.nut.adoc index 64d17fdd0f..331134f832 100644 --- a/INSTALL.nut.adoc +++ b/INSTALL.nut.adoc @@ -99,7 +99,7 @@ ifndef::top_builddir[] endif::top_builddir[] // // -// Address links on GitHub vs docs +// Address links on GitHub vs. docs // (note: 'env-github' attribute is set on GitHub) // // - when generating docs: diff --git a/Jenkinsfile-dynamatrix b/Jenkinsfile-dynamatrix index e55a526ddd..0092ff7607 100644 --- a/Jenkinsfile-dynamatrix +++ b/Jenkinsfile-dynamatrix @@ -514,7 +514,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -551,7 +551,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] ], body) @@ -600,7 +600,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] ], body) @@ -643,7 +643,7 @@ set | sort -n """ [~/GCCVER=[01234].+/, ~/BUILD_TYPE=default-alldrv/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C ], body) }, // getParStages @@ -681,7 +681,7 @@ set | sort -n """ [~/GCCVER=[01234].+/, ~/BUILD_TYPE=default-alldr(v|v:no-distcheck)/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] ], body) @@ -718,7 +718,7 @@ set | sort -n """ [~/GCCVER=[01234].+/, ~/BUILD_TYPE=default-alldrv/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -758,7 +758,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -806,7 +806,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -847,7 +847,7 @@ set | sort -n """ [~/BUILD_TYPE=default-withdoc:man/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -884,7 +884,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] ], body) @@ -921,7 +921,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_NOT_GCC] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -955,7 +955,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -994,7 +994,7 @@ set | sort -n """ [~/OS_FAMILY=.+/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: [ [~/BITS=32/, ~/ARCH_BITS=64/], [~/BITS=64/, ~/ARCH_BITS=32/], [~/CSTDVARIANT=c/], @@ -1035,7 +1035,7 @@ set | sort -n """ [~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD] + [dynacfgPipeline.axisCombos_WINDOWS_CROSS] @@ -1076,7 +1076,7 @@ set | sort -n """ [~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [ [~/COMPILER=GCC/, ~/CSTDVERSION_KEY=(?!89)/] ] + @@ -1119,7 +1119,7 @@ set | sort -n """ dynacfgPipeline.axisCombos_WINDOWS ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C + [ [~/COMPILER=(?!GCC)/] ] + @@ -1156,7 +1156,7 @@ set | sort -n """ [~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT + [ dynacfgPipeline.axisCombos_GNU_C, dynacfgPipeline.axisCombos_WINDOWS_CROSS, @@ -1196,7 +1196,7 @@ set | sort -n """ [~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT + [ dynacfgPipeline.axisCombos_GNU_C, dynacfgPipeline.axisCombos_WINDOWS_CROSS, @@ -1233,7 +1233,7 @@ set | sort -n """ [~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT + [ dynacfgPipeline.axisCombos_GNU_C, dynacfgPipeline.axisCombos_WINDOWS_CROSS, @@ -1272,7 +1272,7 @@ set | sort -n """ [~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: [ dynacfgPipeline.axisCombos_ARCH32x64, dynacfgPipeline.axisCombos_ARCH64x32, @@ -1316,7 +1316,7 @@ set | sort -n """ //[~/BUILD_WARNOPT=hard/] ], runAllowedFailure: true, - mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined! + mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs. language standards as centrally defined! excludeCombos: [ dynacfgPipeline.axisCombos_ARCH32x64, dynacfgPipeline.axisCombos_ARCH64x32, diff --git a/Makefile.am b/Makefile.am index c96718c0a8..f570c0bf46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -528,13 +528,13 @@ setver: # Clean the dist tarball and packages MAINTAINERCLEANFILES_DISTBALL = nut-*.tar.gz # HP-UX: -MAINTAINERCLEANFILES_PACKAGES = NUT_HPUX_package@PACKAGE_VERSION@.depot +MAINTAINERCLEANFILES_PACKAGES = NUT_HPUX_package@PACKAGE_VERSION@.depot NUT_HPUX_package-@PACKAGE_VERSION@.depot # AIX as below, and RedHat-compatible (cover binary and source packages): MAINTAINERCLEANFILES_PACKAGES += nut*rpm # Debian-compatible (cover binary and source packages): MAINTAINERCLEANFILES_PACKAGES += nut*deb # Solaris SVR4 package archives: -MAINTAINERCLEANFILES_PACKAGES += NUT_solaris_*_package@PACKAGE_VERSION@.local.gz +MAINTAINERCLEANFILES_PACKAGES += NUT_solaris_*_package@PACKAGE_VERSION@.local.gz NUT_solaris_*_package-@PACKAGE_VERSION@.local.gz # Newer Solaris IPS (aka "pkg(5)" format archives) MAINTAINERCLEANFILES_PACKAGES += *.p5p @@ -548,7 +548,7 @@ package: dist "HP-UX") \ ( cd scripts/HP-UX && \ $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \ - mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@PACKAGE_VERSION@.depot ) ;; \ + mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package-@PACKAGE_VERSION@.depot ) ;; \ "SunOS") \ $(MAKE) $(AM_MAKEFLAGS) && \ $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \ diff --git a/NEWS.adoc b/NEWS.adoc index c4ad725faf..678d06328c 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -486,6 +486,12 @@ relocated into new `shutdown.default` INSTCMD definitions. [#2670] and it defaults to `true` allowing for better ordered documents at the cost of some memory during document generation. [#2510] + - updated man page generation with `configure` script options to specify that + manual sections on the target platform differ from (Linux-based) defaults + hard-coded into page sources; this should allow to simplify NUT packaging + recipe maintenance in distributions (no more updating patches for changed + or added documentation sources). + - lines in first section of NUT configuration report (can optionally remain as `config.nut_report_feature.log` and be installed into shared documentation of a NUT package) are now better grouped as miscellaneous features and @@ -1632,7 +1638,7 @@ refer to this change set (too long in the making) as NUT 2.7.5. autoconf-2.70 releases in 2020 (also works with 2.69 which was the earlier release since 2012) * Dynamic library loading used in certain programs and use-cases improved, - especially for 64-bit vs 32-bit builds on multiple-bitness OSes + especially for 64-bit vs. 32-bit builds on multiple-bitness OSes * Logging routines like `upsdebugx()` were refactored as macros so there is slightly less overhead when logging is disabled [PRs #685 and #1100] * Numerous classes of compilation warnings eradicated, many of those being @@ -1867,7 +1873,7 @@ Release notes for NUT 2.7.2 - what's new since 2.7.1 * Emerson Network Power Liebert PSI 1440 * MicroDowell B.Box LP 500 * Numeric Digital 800 plus - * OptiUPS VS 575C + * OptiUPS vs. 575C * Tripp Lite SU10KRT3/1X - FreeDesktop Hardware Abstraction Layer (HAL) support was removed. diff --git a/README.adoc b/README.adoc index e90bc966cd..22b43ad729 100644 --- a/README.adoc +++ b/README.adoc @@ -99,7 +99,7 @@ ifndef::top_builddir[] endif::top_builddir[] // // -// Address links on GitHub vs docs +// Address links on GitHub vs. docs // (note: 'env-github' attribute is set on GitHub) // // - when generating docs: diff --git a/UPGRADING.adoc b/UPGRADING.adoc index b3d5924cd9..52b4fc831d 100644 --- a/UPGRADING.adoc +++ b/UPGRADING.adoc @@ -44,6 +44,20 @@ Changes from 2.8.2 to 2.8.3 Please use it, it immensely helps with community troubleshooting! [issue #1949] +- Reference packages prepared by `make package` should now separate the + `PACKAGE_VERSION` from the platform-dependent prefix by a dash character + in the ultimate package file name. Previously they were glued together + for some platform targets (HPUX, Solaris). Solaris SVR4 package file names + should new differentiate `i386` vs. `amd64` and `sparc` vs. `sparcv9`, + depending on `target_cpu` of the build. If you had any scripts relying + on the older pattern, they may have to be updated. + +- Updated man page generation with `configure` script options to specify that + manual sections on the target platform differ from (Linux-based) defaults + hard-coded into page sources; this should allow to simplify NUT packaging + recipe maintenance in distributions (no more updating patches for changed + or added documentation sources) + - `upsmon` should now integrate natively with systemd-driven OS sleep events (built with systemd version 221 or newer "inhibitor interface"), so various hacks previously packaged into `/usr/lib/systemd/system-sleep/` scripts or @@ -257,7 +271,7 @@ Changes from 2.8.0 to 2.8.1 - The `upsd.conf` listing of `LISTEN` addresses was previously inverted (the last listed address was applied first), which was counter-intuitive and fixed for this release. If user configurations somehow relied on this - order (e.g. to prioritize IPv6 vs IPv4 listeners), configuration changes + order (e.g. to prioritize IPv6 vs. IPv4 listeners), configuration changes may be needed. [#2012] - The `upsd` configured to listen on IPv6 addresses should handle only diff --git a/autogen.sh b/autogen.sh index f59d93e886..de5bb71b03 100755 --- a/autogen.sh +++ b/autogen.sh @@ -175,7 +175,7 @@ echo "----------------------------------------------------------------------" echo "Please note that on some systems the routine below can complain that " echo " > configure.ac: warning: AC_INIT: not a literal: m4_esyscmd_s(...)" echo "but still does the right thing about PACKAGE_VERSION and PACKAGE_URL settings." -echo "Check if your distro provides an 'autoconf-archive' package anf if it helps." +echo "Check if your distro provides an 'autoconf-archive' package and if it helps." echo "Please post an issue in NUT bug tracker with platform details if it does not." echo "----------------------------------------------------------------------" diff --git a/ci_build.sh b/ci_build.sh index 3f60f870f8..b702482423 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -1991,7 +1991,7 @@ default|default-alldrv|default-alldrv:no-distcheck|default-all-errors|default-sp done # TODO: Similar loops for other variations like TESTING, - # MGE SHUT vs other serial protocols... + # MGE SHUT vs. other serial protocols... if can_clean_check ; then echo "=== One final try for optional_maintainer_clean_check:" diff --git a/clients/nutclient.cpp b/clients/nutclient.cpp index d873e387c0..fd63197c8b 100644 --- a/clients/nutclient.cpp +++ b/clients/nutclient.cpp @@ -295,7 +295,7 @@ void Socket::connect(const std::string& host, uint16_t port) snprintf(sport, sizeof(sport), "%" PRIuMAX, static_cast(port)); memset(&hints, 0, sizeof(hints)); - /* TODO? Port IPv4 vs IPv6 detail from upsclient.c */ + /* TODO? Port IPv4 vs. IPv6 detail from upsclient.c */ hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; diff --git a/common/common.c b/common/common.c index a71cb70f1d..eca17bd867 100644 --- a/common/common.c +++ b/common/common.c @@ -678,9 +678,15 @@ const char *suggest_doc_links(const char *progname, const char *progconf) { snprintf(buf, sizeof(buf), "For more information please "); #if defined(WITH_DOCS) && WITH_DOCS + /* FIXME: Currently all NUT tools and drivers are in same + * man page section for "System Management Programs". + * If this ever changes (e.g. clients like `upsc` can be + * a "User Program" just as well), we may need an extra + method argument here. + */ snprintfcat(buf, sizeof(buf), - "Read The Fine Manual ('man %s') and/or ", - buf2); + "Read The Fine Manual ('man %s %s') and/or ", + MAN_SECTION_CMD_SYS, buf2); #endif snprintfcat(buf, sizeof(buf), "see\n\t%s/docs/man/%s.html\n", diff --git a/configure.ac b/configure.ac index ffcfd9d480..24e79b7b73 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ dnl off by `dirname` should do the trick. dnl NOTE: the resulting NUT_WEBSITE_BASE string does not end with a slash! NUT_WEBSITE_BASE="`dirname "${PACKAGE_URL}index.html"`" dnl Fallback, no trailing slash! -[ -n "${NUT_WEBSITE_BASE-}" ] || NUT_WEBSITE_BASE='https://www.networkupstools.org' +test -n "${NUT_WEBSITE_BASE-}" || NUT_WEBSITE_BASE='https://www.networkupstools.org' dnl Note: this refers to GITREV at the time of configure script running dnl primarily for better messaging in the script itself (also to render @@ -2130,6 +2130,12 @@ dnl the usual builds can pass by default on systems without asciidoc. NUT_ARG_WITH([docs], [build and install documentation (alias to --with-doc)], [man=auto]) NUT_ARG_WITH([doc], [build and install documentation (see docs/configure.txt for many variants of the option)], [${nut_with_docs}]) +dnl NOTE: Sections may be strings, not pure numbers, on some platforms: +NUT_ARG_WITH([docs-man-section-api], [man page section for library APIs], [3]) +NUT_ARG_WITH([docs-man-section-cfg], [man page section for configuration files], [5]) +NUT_ARG_WITH([docs-man-section-cmd-sys], [man page section for system management commands], [8]) +NUT_ARG_WITH([docs-man-section-cmd-usr], [man page section for user commands], [1]) + dnl NOTE: Until X-Mas 2021, the default was "legacy" (now "medium") NUT_ARG_ENABLE([warnings], [enable warning presets that were picked as useful in maintainership and CI practice (variants include gcc-minimal, gcc-medium, gcc-hard, clang-minimal, clang-medium, clang-hard, all; auto-choosers: hard, medium, minimal, yes=auto='gcc or clang or all at hardcoded default difficulty')], @@ -3432,6 +3438,37 @@ fi AM_CONDITIONAL(WITH_PDFS, test "${WITH_PDFS}" = "yes") AM_CONDITIONAL(SKIP_PDFS, test "${SKIP_PDFS}" = "yes") +dnl NOTE: Sections may be strings, not pure numbers, on some platforms: +MAN_SECTION_API="${nut_with_docs_man_section_api}" +MAN_SECTION_CFG="${nut_with_docs_man_section_cfg}" +MAN_SECTION_CMD_SYS="${nut_with_docs_man_section_cmd_sys}" +MAN_SECTION_CMD_USR="${nut_with_docs_man_section_cmd_usr}" + +MAN_SECTION_API_BASE="`echo "${MAN_SECTION_API}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`" +MAN_SECTION_CFG_BASE="`echo "${MAN_SECTION_CFG}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`" +MAN_SECTION_CMD_SYS_BASE="`echo "${MAN_SECTION_CMD_SYS}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`" +MAN_SECTION_CMD_USR_BASE="`echo "${MAN_SECTION_CMD_USR}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`" + +AC_DEFINE_UNQUOTED([MAN_SECTION_API], ["${MAN_SECTION_API}"], [man page section for library APIs]) +AC_DEFINE_UNQUOTED([MAN_SECTION_CFG], ["${MAN_SECTION_CFG}"], [man page section for configuration files]) +AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_SYS], ["${MAN_SECTION_CMD_SYS}"], [man page section for system management commands]) +AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_USR], ["${MAN_SECTION_CMD_USR}"], [man page section for user commands]) + +AC_DEFINE_UNQUOTED([MAN_SECTION_API_BASE], ["${MAN_SECTION_API_BASE}"], [base (number only) man page section for library APIs]) +AC_DEFINE_UNQUOTED([MAN_SECTION_CFG_BASE], ["${MAN_SECTION_CFG_BASE}"], [base (number only) man page section for configuration files]) +AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_SYS_BASE], ["${MAN_SECTION_CMD_SYS_BASE}"], [base (number only) man page section for system management commands]) +AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_USR_BASE], ["${MAN_SECTION_CMD_USR_BASE}"], [base (number only) man page section for user commands]) + +AC_SUBST(MAN_SECTION_API) +AC_SUBST(MAN_SECTION_CFG) +AC_SUBST(MAN_SECTION_CMD_SYS) +AC_SUBST(MAN_SECTION_CMD_USR) + +AC_SUBST(MAN_SECTION_API_BASE) +AC_SUBST(MAN_SECTION_CFG_BASE) +AC_SUBST(MAN_SECTION_CMD_SYS_BASE) +AC_SUBST(MAN_SECTION_CMD_USR_BASE) + dnl ---------------------------------------------------------------------- dnl checks related to --with-dev @@ -4685,6 +4722,14 @@ NUT_DATADIR="${conftemp}" NUT_REPORT_SETTING_PATH([Data file path], NUT_DATADIR, "${conftemp}", [Default path for data files]) +dnl same for mandir +conftemp="${mandir}" +eval conftemp=\"${conftemp}\" +eval conftemp=\"${conftemp}\" +NUT_MANDIR="${conftemp}" +NUT_REPORT_SETTING_PATH([Man page path], + NUT_MANDIR, "${conftemp}", [Default path for man page files]) + dnl same for bindir conftemp="${bindir}" eval conftemp=\"${conftemp}\" @@ -4909,6 +4954,7 @@ AC_SUBST(BINDIR) AC_SUBST(LIBDIR) AC_SUBST(PKGCONFIGDIR) AC_SUBST(NUT_DATADIR, [`eval echo "${NUT_DATADIR}"`]) +AC_SUBST(NUT_MANDIR, [`eval echo "${NUT_MANDIR}"`]) AC_SUBST(NUT_LIBEXECDIR, [`eval echo "${LIBEXECDIR}"`]) AC_SUBST(DRVPATH) AC_SUBST(SBINDIR) diff --git a/docs/Makefile.am b/docs/Makefile.am index 3a525688be..2df7d0e762 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -365,7 +365,7 @@ DOCBUILD_FILTER_GITHUB_LINKS = { \ # The $< is okay here, it is used in a suffix rule below DOCBUILD_CONVERT_GITHUB_LINKS = { \ echo " DOC-ASCIIDOC-GITHUB-LINKS Parsing GitHub link patterns $< => $@"; \ - cat "$<" | $(DOCBUILD_FILTER_GITHUB_LINKS) > "$@.tmp.$$$$" \ + cat '$<' | $(DOCBUILD_FILTER_GITHUB_LINKS) > "$@.tmp.$$$$" \ && mv -f "$@.tmp.$$$$" "$@" \ ; } @@ -379,7 +379,7 @@ $(top_builddir)/ChangeLog: dummy @+echo " DOC-CHANGELOG-GENERATE-WRAPPER $@ : call parent Makefile to decide if (re-)generation is needed" \ && cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) $(@F) -# BSD Make dislikes the path resolution here and does not always populate "$<" +# BSD Make dislikes the path resolution here and does not always populate '$<' # (and claims why: "Using $< in a non-suffix rule context is a GNUmake idiom"), # but it has a "$?" for "list of dependencies that are newer than the target". # For more details see https://man.freebsd.org/cgi/man.cgi @@ -490,11 +490,15 @@ A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) \ # Note we only remove the original target (if present), if it is a directory - # e.g. created by "html-chunked" targets. + +# NOTE: MKDIR_P may be defined via expanded $(top_builddir)/install-sh +# so should be run from $(abs_builddir) to be safe, as we jump around +# the build workspace DOCBUILD_BEGIN = { \ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ rm -rf "./$${A2X_OUTDIR}" || true ; \ test -d "$@" && rm -rf "$@" || true ; \ - $(MKDIR_P) "./$${A2X_OUTDIR}" || exit ; \ + _CWD="`pwd`" && (cd '$(abs_builddir)' && $(MKDIR_P) "$${_CWD}/$${A2X_OUTDIR}") || exit ; \ case "$${A2X_OUTDIR}" in \ tmp/pdf.*) ln -s ../../images "./$${A2X_OUTDIR}" ;; \ esac; \ @@ -544,7 +548,7 @@ DOCBUILD_END = { \ +@A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ echo " DOC-HTML Generating $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl "$( "$${F}-prepped" || exit ; \ + COUNT="`expr $$COUNT + 1`" ; \ done ; \ if ! test -e "$@" ; then touch "$@" ; fi ; \ else \ @@ -900,18 +919,38 @@ $(abs_top_builddir)/docs/.prep-src-docs: $(PREP_SRC) cd "$(abs_top_builddir)" ; \ fi ;; \ "$(srcdir)"/*) F="`echo "$$F" | sed 's#^$(srcdir)/*#./#'`" ;; \ + */*) ;; \ + *) \ + linkroot="$(abs_builddir)" ; \ + linksrcroot="$(abs_srcdir)" ; \ + cd "$(abs_top_builddir)" ;; \ esac ; \ D="`dirname "$$F"`" ; \ - $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ + (cd '$(abs_builddir)' && $(MKDIR_P) "$${linkroot}/$$D") || { rm -f "$@.working" ; exit 1 ; } ; \ if ! test -s "$${linkroot}/$$F" && test -s "$${linksrcroot}/$$F" ; then \ echo " LN '$${linksrcroot}/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" ; \ ln -fs "$${linksrcroot}/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ - if ! test -e "$${linkroot}/$${F}-prepped" ; then \ - touch "$${linkroot}/$${F}-prepped" || { rm -f "$@.working" ; exit 1 ; } ; \ - COUNT="`expr $$COUNT + 1`" ; \ + case "$$F" in \ + *.txt|*.adoc) IS_TEXT=true ;; \ + *.*) IS_TEXT=false ;; \ + *) IS_TEXT=true ;; \ + esac; \ + if $$IS_TEXT ; then \ + grep -w linkman "$${linkroot}/$${F}" > /dev/null || IS_TEXT=false ; \ fi ; \ + if $$MAN_SECTIONS_DEFAULT || ! $$IS_TEXT ; then \ + cat ; \ + else \ + sed \ + -e 's,\(linkman:[^ []*\[\)3\],\1$(MAN_SECTION_API)],g' \ + -e 's,\(linkman:[^ []*\[\)5\],\1$(MAN_SECTION_CFG)],g' \ + -e 's,\(linkman:[^ []*\[\)8\],\1$(MAN_SECTION_CMD_SYS)],g' \ + -e 's,\(linkman:[^ []*\[\)1\],\1$(MAN_SECTION_CMD_USR)],g' ; \ + fi < "$${linkroot}/$${F}" > "$${linkroot}/$${F}-prepped" \ + || { rm -f "$@.working" ; exit 1 ; } ; \ + COUNT="`expr $$COUNT + 1`" ; \ done ; \ fi ; \ if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi diff --git a/docs/asciidoc-vars.conf b/docs/asciidoc-vars.conf index 1506cecfeb..75c9003e3d 100644 --- a/docs/asciidoc-vars.conf +++ b/docs/asciidoc-vars.conf @@ -89,7 +89,7 @@ ifndef::top_builddir[] endif::top_builddir[] // // -// Address links on GitHub vs docs +// Address links on GitHub vs. docs // (note: 'env-github' attribute is set on GitHub) // // - when generating docs: diff --git a/docs/config-prereqs.txt b/docs/config-prereqs.txt index ad94fcd0d9..d1d07ba8c2 100644 --- a/docs/config-prereqs.txt +++ b/docs/config-prereqs.txt @@ -18,7 +18,7 @@ of new releases. up the multi-arch Linux LXC container farm for NUT CI] Some of the below are alternatives, e.g. compiler toolkits (gcc vs. clang) -or SSL implementations (OpenSSL vs Mozilla NSS) -- no problem installing +or SSL implementations (OpenSSL vs. Mozilla NSS) -- no problem installing both, at a disk space cost. [NOTE] @@ -869,7 +869,7 @@ that seems to exceed whatever is available on network mirrors; for example, the CD image included `clang` program while it is not available to `pkg_add`, at least not via http://ftp.netbsd.hu/mirrors/openbsd/6.5/packages/amd64/ mirror. The `gcc` version on CD image differed notably from that in the -networked repository (4.2.x vs 4.9.x). +networked repository (4.2.x vs. 4.9.x). You may have to echo a working base URL (part before "6.5/..." into the `/etc/installurl` file, since the old distribution is no longer served by default site. @@ -1515,10 +1515,10 @@ programs. Further TODO for Windows would include: -* MSVCRT (ubiquitous) vs UCRT (more standards compliant, but since Windows 10) +* MSVCRT (ubiquitous) vs. UCRT (more standards compliant, but since Windows 10) https://docs.microsoft.com/en-us/cpp/porting/upgrade-your-code-to-the-universal-crt?view=msvc-160 -* libusb-0.1 vs libusb-1.0 +* libusb-0.1 vs. libusb-1.0 NOTE: Native mingw, MSYS2, etc. builds on Windows are known to suffer from interaction with antivirus software which holds executable files open and diff --git a/docs/configure.txt b/docs/configure.txt index cc9899e69b..84e74c5108 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -244,9 +244,12 @@ information on how to set up CGI programs. Pretty documentation and man pages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --with-docs= (default: no) --with-doc= (default: no) -Build and install NUT documentation file(s). +Build and install NUT documentation file(s). Note: `--with-doc` is a legacy +NUT option, and `--with-docs` is an alias that matches the more wide-spread +equivalent in different packaging frameworks and projects. This feature requires AsciiDoc 8.6.3 or newer (see https://asciidoc.org). @@ -301,6 +304,21 @@ Example valid formats of this flag: * `--with-doc=pdf,html-chunked` * `--with-doc=man=no,pdf=auto,html-single` +Additional flags with regard to documentation generation include: + + --with-docs-man-section-api= (default: 3) + --with-docs-man-section-cfg= (default: 5) + --with-docs-man-section-cmd-sys= (default: 8) + --with-docs-man-section-cmd-usr= (default: 1) + +Customize man page section identifiers for operating systems whose standards +do not match defaults listed above for Library and API, Configuration Files, +System Management Commands and User Commands sections (e.g. Solaris-derived +systems might use `--with-docs-man-section-cmd-sys=1m`). This impacts not only +file names of the manual pages, but also cross-links in generated documents. +Note that use of these flags does not implicitly enable any `--with-docs=...` +mode, which should still be specified explicitly. + Python support ~~~~~~~~~~~~~~ diff --git a/docs/man/.gitignore b/docs/man/.gitignore index daf5c8b157..b2fe6955b7 100644 --- a/docs/man/.gitignore +++ b/docs/man/.gitignore @@ -1,7 +1,12 @@ -/*.1 -/*.3 -/*.5 -/*.8 +/*.1* +/*.2* +/*.3* +/*.4* +/*.5* +/*.6* +/*.7* +/*.8* +/*.9* /*.html /tmp/ /linkman-driver-names.txt diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index eaa80fb5ab..12ba49916e 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -35,15 +35,15 @@ SRC_CONF_PAGES = \ if WITH_MANS MAN_CONF_PAGES = \ - nut.conf.5 \ - ups.conf.5 \ - upsd.conf.5 \ - upsd.users.5 \ - upsmon.conf.5 \ - upssched.conf.5 + nut.conf.$(MAN_SECTION_CFG) \ + ups.conf.$(MAN_SECTION_CFG) \ + upsd.conf.$(MAN_SECTION_CFG) \ + upsd.users.$(MAN_SECTION_CFG) \ + upsmon.conf.$(MAN_SECTION_CFG) \ + upssched.conf.$(MAN_SECTION_CFG) endif WITH_MANS -man5_MANS = $(MAN_CONF_PAGES) +man@MAN_SECTION_CFG_BASE@_MANS = $(MAN_CONF_PAGES) HTML_CONF_MANS = \ nut.conf.html \ @@ -74,27 +74,27 @@ SRC_CLIENT_PAGES = \ if WITH_MANS MAN_CLIENT_PAGES = \ - nutupsdrv.8 \ - nut-driver-enumerator.8 \ - upsc.8 \ - upscmd.8 \ - upsd.8 \ - upsdrvctl.8 \ - upsdrvsvcctl.8 \ - upslog.8 \ - upsmon.8 \ - upsrw.8 \ - upssched.8 + nutupsdrv.$(MAN_SECTION_CMD_SYS) \ + nut-driver-enumerator.$(MAN_SECTION_CMD_SYS) \ + upsc.$(MAN_SECTION_CMD_SYS) \ + upscmd.$(MAN_SECTION_CMD_SYS) \ + upsd.$(MAN_SECTION_CMD_SYS) \ + upsdrvctl.$(MAN_SECTION_CMD_SYS) \ + upsdrvsvcctl.$(MAN_SECTION_CMD_SYS) \ + upslog.$(MAN_SECTION_CMD_SYS) \ + upsmon.$(MAN_SECTION_CMD_SYS) \ + upsrw.$(MAN_SECTION_CMD_SYS) \ + upssched.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if HAVE_WINDOWS SRC_CLIENT_PAGES += nut.exe.txt if WITH_MANS -MAN_CLIENT_PAGES += nut.exe.8 +MAN_CLIENT_PAGES += nut.exe.$(MAN_SECTION_CMD_SYS) endif WITH_MANS endif HAVE_WINDOWS -man8_MANS = $(MAN_CLIENT_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS = $(MAN_CLIENT_PAGES) HTML_CLIENT_MANS = \ nutupsdrv.html \ @@ -116,10 +116,10 @@ endif HAVE_WINDOWS SRC_TOOL_PAGES = nut-scanner.txt nut-recorder.txt nutconf.txt if WITH_MANS -MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8 nutconf.8 +MAN_TOOL_PAGES = nut-scanner.$(MAN_SECTION_CMD_SYS) nut-recorder.$(MAN_SECTION_CMD_SYS) nutconf.$(MAN_SECTION_CMD_SYS) endif WITH_MANS -man8_MANS += $(MAN_TOOL_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_TOOL_PAGES) HTML_TOOL_MANS = nut-scanner.html nut-recorder.html nutconf.html @@ -133,20 +133,20 @@ SRC_CGI_PAGES = \ upsimage.cgi.txt if WITH_MANS -MAN5_CGI_PAGES = \ - hosts.conf.5 \ - upsset.conf.5 \ - upsstats.html.5 - -MAN8_CGI_PAGES = \ - upsset.cgi.8 \ - upsstats.cgi.8 \ - upsimage.cgi.8 +MAN@MAN_SECTION_CFG_BASE@_CGI_PAGES = \ + hosts.conf.$(MAN_SECTION_CFG) \ + upsset.conf.$(MAN_SECTION_CFG) \ + upsstats.html.$(MAN_SECTION_CFG) + +MAN@MAN_SECTION_CMD_SYS_BASE@_CGI_PAGES = \ + upsset.cgi.$(MAN_SECTION_CMD_SYS) \ + upsstats.cgi.$(MAN_SECTION_CMD_SYS) \ + upsimage.cgi.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_CGI -man5_MANS += $(MAN5_CGI_PAGES) -man8_MANS += $(MAN8_CGI_PAGES) +man@MAN_SECTION_CFG_BASE@_MANS += $(MAN@MAN_SECTION_CFG_BASE@_CGI_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN@MAN_SECTION_CMD_SYS_BASE@_CGI_PAGES) endif WITH_CGI HTML_CGI_MANS = \ @@ -216,162 +216,162 @@ SRC_DEV_PAGES = \ skel.txt if WITH_MANS -# NOTE: nutclient_*.3 has no source counterpart (libnutclient_*.txt) +# NOTE: nutclient_*.$(MAN_SECTION_API) has no source counterpart (libnutclient_*.txt) LIBNUTCLIENT_MISC_DEPS= \ - nutclient_authenticate.3 \ - nutclient_logout.3 \ - nutclient_device_login.3 \ - nutclient_get_device_num_logins.3 \ - nutclient_device_master.3 \ - nutclient_device_forced_shutdown.3 - -$(LIBNUTCLIENT_MISC_DEPS): libnutclient_misc.3 + nutclient_authenticate.$(MAN_SECTION_API) \ + nutclient_logout.$(MAN_SECTION_API) \ + nutclient_device_login.$(MAN_SECTION_API) \ + nutclient_get_device_num_logins.$(MAN_SECTION_API) \ + nutclient_device_master.$(MAN_SECTION_API) \ + nutclient_device_forced_shutdown.$(MAN_SECTION_API) + +$(LIBNUTCLIENT_MISC_DEPS): libnutclient_misc.$(MAN_SECTION_API) touch $@ LIBNUTCLIENT_TCP_DEPS= \ - nutclient_tcp_create_client.3 \ - nutclient_tcp_disconnect.3 \ - nutclient_tcp_get_timeout.3 \ - nutclient_tcp_is_connected.3 \ - nutclient_tcp_reconnect.3 \ - nutclient_tcp_set_timeout.3 - -$(LIBNUTCLIENT_TCP_DEPS): libnutclient_tcp.3 + nutclient_tcp_create_client.$(MAN_SECTION_API) \ + nutclient_tcp_disconnect.$(MAN_SECTION_API) \ + nutclient_tcp_get_timeout.$(MAN_SECTION_API) \ + nutclient_tcp_is_connected.$(MAN_SECTION_API) \ + nutclient_tcp_reconnect.$(MAN_SECTION_API) \ + nutclient_tcp_set_timeout.$(MAN_SECTION_API) + +$(LIBNUTCLIENT_TCP_DEPS): libnutclient_tcp.$(MAN_SECTION_API) touch $@ LIBNUTCLIENT_GENERAL_DEPS= \ - nutclient_destroy.3 + nutclient_destroy.$(MAN_SECTION_API) -$(LIBNUTCLIENT_GENERAL_DEPS): libnutclient_general.3 +$(LIBNUTCLIENT_GENERAL_DEPS): libnutclient_general.$(MAN_SECTION_API) touch $@ LIBNUTCLIENT_VARIABLES_DEPS= \ - nutclient_get_device_rw_variables.3 \ - nutclient_get_device_variable_description.3 \ - nutclient_get_device_variables.3 \ - nutclient_get_device_variable_values.3 \ - nutclient_has_device_variable.3 \ - nutclient_set_device_variable_value.3 \ - nutclient_set_device_variable_values.3 - -$(LIBNUTCLIENT_VARIABLES_DEPS): libnutclient_variables.3 + nutclient_get_device_rw_variables.$(MAN_SECTION_API) \ + nutclient_get_device_variable_description.$(MAN_SECTION_API) \ + nutclient_get_device_variables.$(MAN_SECTION_API) \ + nutclient_get_device_variable_values.$(MAN_SECTION_API) \ + nutclient_has_device_variable.$(MAN_SECTION_API) \ + nutclient_set_device_variable_value.$(MAN_SECTION_API) \ + nutclient_set_device_variable_values.$(MAN_SECTION_API) + +$(LIBNUTCLIENT_VARIABLES_DEPS): libnutclient_variables.$(MAN_SECTION_API) touch $@ LIBNUTCLIENT_COMMANDS_DEPS= \ - nutclient_execute_device_command.3 \ - nutclient_get_device_command_description.3 \ - nutclient_get_device_commands.3 \ - nutclient_has_device_command.3 + nutclient_execute_device_command.$(MAN_SECTION_API) \ + nutclient_get_device_command_description.$(MAN_SECTION_API) \ + nutclient_get_device_commands.$(MAN_SECTION_API) \ + nutclient_has_device_command.$(MAN_SECTION_API) -$(LIBNUTCLIENT_COMMANDS_DEPS): libnutclient_commands.3 +$(LIBNUTCLIENT_COMMANDS_DEPS): libnutclient_commands.$(MAN_SECTION_API) touch $@ LIBNUTCLIENT_DEVICES_DEPS= \ - nutclient_get_device_description.3 \ - nutclient_get_devices.3 \ - nutclient_has_device.3 + nutclient_get_device_description.$(MAN_SECTION_API) \ + nutclient_get_devices.$(MAN_SECTION_API) \ + nutclient_has_device.$(MAN_SECTION_API) -$(LIBNUTCLIENT_DEVICES_DEPS): libnutclient_devices.3 +$(LIBNUTCLIENT_DEVICES_DEPS): libnutclient_devices.$(MAN_SECTION_API) touch $@ -MAN3_DEV_PAGES = \ - upsclient.3 \ - upscli_add_host_cert.3 \ - upscli_cleanup.3 \ - upscli_connect.3 \ - upscli_disconnect.3 \ - upscli_fd.3 \ - upscli_get.3 \ - upscli_init.3 \ - upscli_list_next.3 \ - upscli_list_start.3 \ - upscli_readline.3 \ - upscli_readline_timeout.3 \ - upscli_sendline.3 \ - upscli_sendline_timeout.3 \ - upscli_splitaddr.3 \ - upscli_splitname.3 \ - upscli_ssl.3 \ - upscli_strerror.3 \ - upscli_upserror.3 \ - libnutclient.3 \ - libnutclient_commands.3 \ +MAN@MAN_SECTION_API_BASE@_DEV_PAGES = \ + upsclient.$(MAN_SECTION_API) \ + upscli_add_host_cert.$(MAN_SECTION_API) \ + upscli_cleanup.$(MAN_SECTION_API) \ + upscli_connect.$(MAN_SECTION_API) \ + upscli_disconnect.$(MAN_SECTION_API) \ + upscli_fd.$(MAN_SECTION_API) \ + upscli_get.$(MAN_SECTION_API) \ + upscli_init.$(MAN_SECTION_API) \ + upscli_list_next.$(MAN_SECTION_API) \ + upscli_list_start.$(MAN_SECTION_API) \ + upscli_readline.$(MAN_SECTION_API) \ + upscli_readline_timeout.$(MAN_SECTION_API) \ + upscli_sendline.$(MAN_SECTION_API) \ + upscli_sendline_timeout.$(MAN_SECTION_API) \ + upscli_splitaddr.$(MAN_SECTION_API) \ + upscli_splitname.$(MAN_SECTION_API) \ + upscli_ssl.$(MAN_SECTION_API) \ + upscli_strerror.$(MAN_SECTION_API) \ + upscli_upserror.$(MAN_SECTION_API) \ + libnutclient.$(MAN_SECTION_API) \ + libnutclient_commands.$(MAN_SECTION_API) \ $(LIBNUTCLIENT_COMMANDS_DEPS) \ - libnutclient_devices.3 \ + libnutclient_devices.$(MAN_SECTION_API) \ $(LIBNUTCLIENT_DEVICES_DEPS) \ - libnutclient_general.3 \ + libnutclient_general.$(MAN_SECTION_API) \ $(LIBNUTCLIENT_GENERAL_DEPS) \ - libnutclient_misc.3 \ + libnutclient_misc.$(MAN_SECTION_API) \ $(LIBNUTCLIENT_MISC_DEPS) \ - libnutclient_tcp.3 \ + libnutclient_tcp.$(MAN_SECTION_API) \ $(LIBNUTCLIENT_TCP_DEPS) \ - libnutclient_variables.3 \ + libnutclient_variables.$(MAN_SECTION_API) \ $(LIBNUTCLIENT_VARIABLES_DEPS) \ - nutscan.3 \ - nutscan_scan_snmp.3 \ - nutscan_scan_usb.3 \ - nutscan_scan_xml_http_range.3 \ - nutscan_scan_nut.3 \ - nutscan_scan_nut_simulation.3 \ - nutscan_scan_avahi.3 \ - nutscan_scan_ipmi.3 \ - nutscan_scan_eaton_serial.3 \ - nutscan_display_sanity_check.3 \ - nutscan_display_sanity_check_serial.3 \ - nutscan_display_ups_conf_with_sanity_check.3 \ - nutscan_display_ups_conf.3 \ - nutscan_display_parsable.3 \ - nutscan_init_ip_ranges.3 \ - nutscan_free_ip_ranges.3 \ - nutscan_stringify_ip_ranges.3 \ - nutscan_add_ip_range.3 \ - nutscan_ip_ranges_iter_init.3 \ - nutscan_ip_ranges_iter_inc.3 \ - nutscan_cidr_to_ip.3 \ - nutscan_new_device.3 \ - nutscan_free_device.3 \ - nutscan_add_option_to_device.3 \ - nutscan_add_commented_option_to_device.3 \ - nutscan_add_device_to_device.3 \ - nutscan_get_serial_ports_list.3 \ - nutscan_init.3 + nutscan.$(MAN_SECTION_API) \ + nutscan_scan_snmp.$(MAN_SECTION_API) \ + nutscan_scan_usb.$(MAN_SECTION_API) \ + nutscan_scan_xml_http_range.$(MAN_SECTION_API) \ + nutscan_scan_nut.$(MAN_SECTION_API) \ + nutscan_scan_nut_simulation.$(MAN_SECTION_API) \ + nutscan_scan_avahi.$(MAN_SECTION_API) \ + nutscan_scan_ipmi.$(MAN_SECTION_API) \ + nutscan_scan_eaton_serial.$(MAN_SECTION_API) \ + nutscan_display_sanity_check.$(MAN_SECTION_API) \ + nutscan_display_sanity_check_serial.$(MAN_SECTION_API) \ + nutscan_display_ups_conf_with_sanity_check.$(MAN_SECTION_API) \ + nutscan_display_ups_conf.$(MAN_SECTION_API) \ + nutscan_display_parsable.$(MAN_SECTION_API) \ + nutscan_init_ip_ranges.$(MAN_SECTION_API) \ + nutscan_free_ip_ranges.$(MAN_SECTION_API) \ + nutscan_stringify_ip_ranges.$(MAN_SECTION_API) \ + nutscan_add_ip_range.$(MAN_SECTION_API) \ + nutscan_ip_ranges_iter_init.$(MAN_SECTION_API) \ + nutscan_ip_ranges_iter_inc.$(MAN_SECTION_API) \ + nutscan_cidr_to_ip.$(MAN_SECTION_API) \ + nutscan_new_device.$(MAN_SECTION_API) \ + nutscan_free_device.$(MAN_SECTION_API) \ + nutscan_add_option_to_device.$(MAN_SECTION_API) \ + nutscan_add_commented_option_to_device.$(MAN_SECTION_API) \ + nutscan_add_device_to_device.$(MAN_SECTION_API) \ + nutscan_get_serial_ports_list.$(MAN_SECTION_API) \ + nutscan_init.$(MAN_SECTION_API) # Alias page for one text describing two commands: -upscli_readline_timeout.3: upscli_readline.3 +upscli_readline_timeout.$(MAN_SECTION_API): upscli_readline.$(MAN_SECTION_API) touch $@ -upscli_sendline_timeout.3: upscli_sendline.3 +upscli_sendline_timeout.$(MAN_SECTION_API): upscli_sendline.$(MAN_SECTION_API) touch $@ -nutscan_scan_ip_range_snmp.3: nutscan_scan_snmp.3 +nutscan_scan_ip_range_snmp.$(MAN_SECTION_API): nutscan_scan_snmp.$(MAN_SECTION_API) touch $@ -nutscan_scan_ip_range_xml_http.3: nutscan_scan_xml_http_range.3 +nutscan_scan_ip_range_xml_http.$(MAN_SECTION_API): nutscan_scan_xml_http_range.$(MAN_SECTION_API) touch $@ -nutscan_scan_ip_range_nut.3: nutscan_scan_nut.3 +nutscan_scan_ip_range_nut.$(MAN_SECTION_API): nutscan_scan_nut.$(MAN_SECTION_API) touch $@ -nutscan_scan_ip_range_ipmi.3: nutscan_scan_ipmi.3 +nutscan_scan_ip_range_ipmi.$(MAN_SECTION_API): nutscan_scan_ipmi.$(MAN_SECTION_API) touch $@ -nutscan_add_commented_option_to_device.3: nutscan_add_option_to_device.3 +nutscan_add_commented_option_to_device.$(MAN_SECTION_API): nutscan_add_option_to_device.$(MAN_SECTION_API) touch $@ -MAN1_DEV_PAGES = \ - libupsclient-config.1 +MAN@MAN_SECTION_CMD_USR_BASE@_DEV_PAGES = \ + libupsclient-config.$(MAN_SECTION_CMD_USR) -MAN8_DEV_PAGES = \ - sockdebug.8 +MAN@MAN_SECTION_CMD_SYS_BASE@_DEV_PAGES = \ + sockdebug.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_DEV -man3_MANS = $(MAN3_DEV_PAGES) -man8_MANS += $(MAN8_DEV_PAGES) +man@MAN_SECTION_API_BASE@_MANS = $(MAN@MAN_SECTION_API_BASE@_DEV_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN@MAN_SECTION_CMD_SYS_BASE@_DEV_PAGES) if !WITH_PKG_CONFIG -man1_MANS = $(MAN1_DEV_PAGES) +man@MAN_SECTION_CMD_USR_BASE@_MANS = $(MAN@MAN_SECTION_CMD_USR_BASE@_DEV_PAGES) endif !WITH_PKG_CONFIG endif WITH_DEV @@ -469,7 +469,7 @@ nutscan_add_commented_option_to_device.html: nutscan_add_option_to_device.html # If (--with-drivers=...) then we only build specific documents, however # still do track (and EXTRA_DIST, and spellcheck) all available sources. if SOME_DRIVERS -man8_MANS += $(DRIVER_MAN_LIST) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(DRIVER_MAN_LIST) endif # (--with-serial) @@ -530,63 +530,63 @@ endif HAVE_LINUX_SERIAL_H if ! SOME_DRIVERS if WITH_MANS MAN_SERIAL_PAGES = \ - al175.8 \ - apcsmart.8 \ - apcsmart-old.8 \ - bcmxcp.8 \ - belkin.8 \ - belkinunv.8 \ - bestfortress.8 \ - bestuferrups.8 \ - bestups.8 \ - bestfcom.8 \ - bicker_ser.8 \ - blazer_ser.8 \ - clone.8 \ - clone-outlet.8 \ - dummy-ups.8 \ - etapro.8 \ - everups.8 \ - gamatronic.8 \ - genericups.8 \ - isbmex.8 \ - ivtscd.8 \ - liebert.8 \ - liebert-gxe.8 \ - liebert-esp2.8 \ - masterguard.8 \ - metasys.8 \ - mge-shut.8 \ - mge-utalk.8 \ - oneac.8 \ - microdowell.8 \ - microsol-apc.8 \ - nutdrv_siemens_sitop.8 \ - optiups.8 \ - powercom.8 \ - powerpanel.8 \ - rhino.8 \ - riello_ser.8 \ - sms_ser.8 \ - safenet.8 \ - solis.8 \ - tripplite.8 \ - tripplitesu.8 \ - upscode2.8 \ - victronups.8 \ - apcupsd-ups.8 + al175.$(MAN_SECTION_CMD_SYS) \ + apcsmart.$(MAN_SECTION_CMD_SYS) \ + apcsmart-old.$(MAN_SECTION_CMD_SYS) \ + bcmxcp.$(MAN_SECTION_CMD_SYS) \ + belkin.$(MAN_SECTION_CMD_SYS) \ + belkinunv.$(MAN_SECTION_CMD_SYS) \ + bestfortress.$(MAN_SECTION_CMD_SYS) \ + bestuferrups.$(MAN_SECTION_CMD_SYS) \ + bestups.$(MAN_SECTION_CMD_SYS) \ + bestfcom.$(MAN_SECTION_CMD_SYS) \ + bicker_ser.$(MAN_SECTION_CMD_SYS) \ + blazer_ser.$(MAN_SECTION_CMD_SYS) \ + clone.$(MAN_SECTION_CMD_SYS) \ + clone-outlet.$(MAN_SECTION_CMD_SYS) \ + dummy-ups.$(MAN_SECTION_CMD_SYS) \ + etapro.$(MAN_SECTION_CMD_SYS) \ + everups.$(MAN_SECTION_CMD_SYS) \ + gamatronic.$(MAN_SECTION_CMD_SYS) \ + genericups.$(MAN_SECTION_CMD_SYS) \ + isbmex.$(MAN_SECTION_CMD_SYS) \ + ivtscd.$(MAN_SECTION_CMD_SYS) \ + liebert.$(MAN_SECTION_CMD_SYS) \ + liebert-gxe.$(MAN_SECTION_CMD_SYS) \ + liebert-esp2.$(MAN_SECTION_CMD_SYS) \ + masterguard.$(MAN_SECTION_CMD_SYS) \ + metasys.$(MAN_SECTION_CMD_SYS) \ + mge-shut.$(MAN_SECTION_CMD_SYS) \ + mge-utalk.$(MAN_SECTION_CMD_SYS) \ + oneac.$(MAN_SECTION_CMD_SYS) \ + microdowell.$(MAN_SECTION_CMD_SYS) \ + microsol-apc.$(MAN_SECTION_CMD_SYS) \ + nutdrv_siemens_sitop.$(MAN_SECTION_CMD_SYS) \ + optiups.$(MAN_SECTION_CMD_SYS) \ + powercom.$(MAN_SECTION_CMD_SYS) \ + powerpanel.$(MAN_SECTION_CMD_SYS) \ + rhino.$(MAN_SECTION_CMD_SYS) \ + riello_ser.$(MAN_SECTION_CMD_SYS) \ + sms_ser.$(MAN_SECTION_CMD_SYS) \ + safenet.$(MAN_SECTION_CMD_SYS) \ + solis.$(MAN_SECTION_CMD_SYS) \ + tripplite.$(MAN_SECTION_CMD_SYS) \ + tripplitesu.$(MAN_SECTION_CMD_SYS) \ + upscode2.$(MAN_SECTION_CMD_SYS) \ + victronups.$(MAN_SECTION_CMD_SYS) \ + apcupsd-ups.$(MAN_SECTION_CMD_SYS) if HAVE_LINUX_SERIAL_H # Temporary, until ported to more OSes MAN_SERIAL_PAGES += \ - nhs_ser.8 + nhs_ser.$(MAN_SECTION_CMD_SYS) endif HAVE_LINUX_SERIAL_H endif WITH_MANS if WITH_SERIAL -man8_MANS += $(MAN_SERIAL_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_SERIAL_PAGES) endif WITH_SERIAL HTML_SERIAL_MANS = \ @@ -648,11 +648,11 @@ endif ! SOME_DRIVERS SRC_SNMP_PAGES = snmp-ups.txt if ! SOME_DRIVERS if WITH_MANS -MAN_SNMP_PAGES = snmp-ups.8 +MAN_SNMP_PAGES = snmp-ups.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_SNMP -man8_MANS += $(MAN_SNMP_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_SNMP_PAGES) endif WITH_SNMP HTML_SNMP_MANS = snmp-ups.html @@ -674,17 +674,17 @@ if ! SOME_DRIVERS # NOTE: nut_usb_addvars and blazer-common are not standalone man pages if WITH_MANS MAN_USB_LIBUSB_PAGES = \ - bcmxcp_usb.8 \ - blazer_usb.8 \ - nutdrv_atcl_usb.8 \ - richcomm_usb.8 \ - riello_usb.8 \ - tripplite_usb.8 \ - usbhid-ups.8 + bcmxcp_usb.$(MAN_SECTION_CMD_SYS) \ + blazer_usb.$(MAN_SECTION_CMD_SYS) \ + nutdrv_atcl_usb.$(MAN_SECTION_CMD_SYS) \ + richcomm_usb.$(MAN_SECTION_CMD_SYS) \ + riello_usb.$(MAN_SECTION_CMD_SYS) \ + tripplite_usb.$(MAN_SECTION_CMD_SYS) \ + usbhid-ups.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_USB -man8_MANS += $(MAN_USB_LIBUSB_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_USB_LIBUSB_PAGES) endif WITH_USB HTML_USB_LIBUSB_MANS = \ @@ -704,14 +704,14 @@ SRC_SERIAL_USB_PAGES = \ if ! SOME_DRIVERS if WITH_MANS MAN_SERIAL_USB_PAGES = \ - nutdrv_qx.8 + nutdrv_qx.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_SERIAL -man8_MANS += $(MAN_SERIAL_USB_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_SERIAL_USB_PAGES) else !WITH_SERIAL if WITH_USB -man8_MANS += $(MAN_SERIAL_USB_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_SERIAL_USB_PAGES) endif WITH_USB endif !WITH_SERIAL @@ -723,11 +723,11 @@ endif ! SOME_DRIVERS SRC_NETXML_PAGES = netxml-ups.txt if ! SOME_DRIVERS if WITH_MANS -MAN_NETXML_PAGES = netxml-ups.8 +MAN_NETXML_PAGES = netxml-ups.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_NEON -man8_MANS += $(MAN_NETXML_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_NETXML_PAGES) endif WITH_NEON HTML_NETXML_MANS = netxml-ups.html @@ -737,11 +737,11 @@ endif ! SOME_DRIVERS SRC_POWERMAN_PAGES = powerman-pdu.txt if ! SOME_DRIVERS if WITH_MANS -MAN_POWERMAN_PAGES = powerman-pdu.8 +MAN_POWERMAN_PAGES = powerman-pdu.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_LIBPOWERMAN -man8_MANS += $(MAN_POWERMAN_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_POWERMAN_PAGES) endif WITH_LIBPOWERMAN HTML_POWERMAN_MANS = powerman-pdu.html @@ -751,11 +751,11 @@ endif ! SOME_DRIVERS SRC_IPMIPSU_PAGES = nut-ipmipsu.txt if ! SOME_DRIVERS if WITH_MANS -MAN_IPMIPSU_PAGES = nut-ipmipsu.8 +MAN_IPMIPSU_PAGES = nut-ipmipsu.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_IPMI -man8_MANS += $(MAN_IPMIPSU_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_IPMIPSU_PAGES) endif WITH_IPMI HTML_IPMIPSU_MANS = nut-ipmipsu.html @@ -765,11 +765,11 @@ endif ! SOME_DRIVERS SRC_MACOSX_PAGES = macosx-ups.txt if ! SOME_DRIVERS if WITH_MANS -MAN_MACOSX_PAGES = macosx-ups.8 +MAN_MACOSX_PAGES = macosx-ups.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_MACOSX -man8_MANS += $(MAN_MACOSX_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_MACOSX_PAGES) endif WITH_MACOSX HTML_MACOSX_MANS = macosx-ups.html @@ -785,16 +785,16 @@ SRC_MODBUS_PAGES = phoenixcontact_modbus.txt \ if ! SOME_DRIVERS if WITH_MANS -MAN_MODBUS_PAGES = phoenixcontact_modbus.8 \ - generic_modbus.8 \ - huawei-ups2000.8 \ - socomec_jbus.8 \ - adelsystem_cbi.8 \ - apc_modbus.8 +MAN_MODBUS_PAGES = phoenixcontact_modbus.$(MAN_SECTION_CMD_SYS) \ + generic_modbus.$(MAN_SECTION_CMD_SYS) \ + huawei-ups2000.$(MAN_SECTION_CMD_SYS) \ + socomec_jbus.$(MAN_SECTION_CMD_SYS) \ + adelsystem_cbi.$(MAN_SECTION_CMD_SYS) \ + apc_modbus.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_MODBUS -man8_MANS += $(MAN_MODBUS_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_MODBUS_PAGES) endif WITH_MODBUS HTML_MODBUS_MANS = phoenixcontact_modbus.html \ @@ -809,11 +809,11 @@ endif ! SOME_DRIVERS SRC_LINUX_I2C_PAGES = asem.txt pijuice.txt hwmon_ina219.txt if ! SOME_DRIVERS if WITH_MANS -MAN_LINUX_I2C_PAGES = asem.8 pijuice.8 hwmon_ina219.8 +MAN_LINUX_I2C_PAGES = asem.$(MAN_SECTION_CMD_SYS) pijuice.$(MAN_SECTION_CMD_SYS) hwmon_ina219.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_LINUX_I2C -man8_MANS += $(MAN_LINUX_I2C_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_LINUX_I2C_PAGES) endif WITH_LINUX_I2C HTML_LINUX_I2C_MANS = asem.html pijuice.html hwmon_ina219.html @@ -823,11 +823,11 @@ endif ! SOME_DRIVERS SRC_GPIO_PAGES = generic_gpio.txt if ! SOME_DRIVERS if WITH_MANS -MAN_GPIO_PAGES = generic_gpio.8 +MAN_GPIO_PAGES = generic_gpio.$(MAN_SECTION_CMD_SYS) endif WITH_MANS if WITH_GPIO -man8_MANS += $(MAN_GPIO_PAGES) +man@MAN_SECTION_CMD_SYS_BASE@_MANS += $(MAN_GPIO_PAGES) endif WITH_GPIO HTML_GPIO_MANS = generic_gpio.html @@ -839,11 +839,11 @@ MAN_MANS += \ $(MAN_CONF_PAGES) \ $(MAN_CLIENT_PAGES) \ $(MAN_TOOL_PAGES) \ - $(MAN5_CGI_PAGES) \ - $(MAN8_CGI_PAGES) \ - $(MAN1_DEV_PAGES) \ - $(MAN3_DEV_PAGES) \ - $(MAN8_DEV_PAGES) \ + $(MAN@MAN_SECTION_CFG_BASE@_CGI_PAGES) \ + $(MAN@MAN_SECTION_CMD_SYS_BASE@_CGI_PAGES) \ + $(MAN@MAN_SECTION_CMD_USR_BASE@_DEV_PAGES) \ + $(MAN@MAN_SECTION_API_BASE@_DEV_PAGES) \ + $(MAN@MAN_SECTION_CMD_SYS_BASE@_DEV_PAGES) \ $(MAN_SERIAL_PAGES) \ $(MAN_SNMP_PAGES) \ $(MAN_USB_LIBUSB_PAGES) \ @@ -940,7 +940,7 @@ endif WITH_HTML_CHUNKED endif !WITH_HTML_SINGLE # Note: target documents, except nutupsdrv.txt itself, start the -# list of drivers with `- linkman:nutupsdrv[8]` entry +# list of drivers with `- linkman:nutupsdrv[$(MAN_SECTION_CMD_SYS)]` entry # To regenerate these files, do `make distclean` first LINKMAN_INCLUDE_GENERATED = linkman-driver-names.txt linkman-drivertool-names.txt LINKMAN_INCLUDE_CONSUMERS = index.txt upsd.txt nutupsdrv.txt @@ -956,7 +956,7 @@ linkman-driver-names.txt: for F in $(SRC_DRIVERS_PAGES) ; do echo "$$F" ; done \ | grep -vE '^nutupsdrv\.txt$$' \ | sort -n | uniq \ - | sed 's,^\(.*\)\.txt$$,- linkman:\1[8],' ; \ + | sed 's,^\(.*\)\.txt$$,- linkman:\1[$(MAN_SECTION_CMD_SYS)],' ; \ ) > "$@" @if test ! -s "$@" ; then echo "- No NUT drivers were built" > "$@" ; fi @@ -970,7 +970,7 @@ linkman-drivertool-names.txt: (LC_ALL=C; LANG=C; export LC_ALL LANG; \ for F in $(SRC_DRIVERTOOL_PAGES) ; do echo "$$F" ; done \ | sort -n | uniq \ - | sed 's,^\(.*\)\.txt$$,- linkman:\1[8],' ; \ + | sed 's,^\(.*\)\.txt$$,- linkman:\1[$(MAN_SECTION_CMD_SYS)],' ; \ ) > "$@" @if test ! -s "$@" ; then echo "- No NUT driver tools were built" > "$@" ; fi @@ -1055,7 +1055,7 @@ check-man-txt: $(SRC_ALL_PAGES) CLEANFILES = *-spellchecked .prep-src-docs *-prepped -SUFFIXES = .txt-prepped .txt .html .1 .3 .5 .8 +SUFFIXES = .txt-prepped .txt .html .$(MAN_SECTION_CMD_USR) .$(MAN_SECTION_API) .$(MAN_SECTION_CFG) .$(MAN_SECTION_CMD_SYS) # For builds with allowed installation of prebuilt man pages, check that # they exist in sources (make would pull them automatically as a fallback @@ -1069,15 +1069,18 @@ endif if HAVE_ASCIIDOC -CLEANFILES += *.1 *.3 *.5 *.8 *.xml *.html *.pdf +CLEANFILES += *.$(MAN_SECTION_CMD_USR) *.$(MAN_SECTION_API) *.$(MAN_SECTION_CFG) *.$(MAN_SECTION_CMD_SYS) *.xml *.html *.pdf # Working around a2x not friendly to parallelized runs. # See more details in the main NUT docs/Makefile.am +# NOTE: MKDIR_P may be defined via expanded $(top_builddir)/install-sh +# so should be run from $(abs_builddir) to be safe, as we jump around +# the build workspace DOCBUILD_BEGIN = { \ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ rm -rf "./$${A2X_OUTDIR}" || true ; \ test -d "$@" && rm -rf "$@" || true ; \ - $(MKDIR_P) "./$${A2X_OUTDIR}" || exit ; \ + _CWD="`pwd`" && (cd '$(abs_builddir)' && $(MKDIR_P) "$${_CWD}/$${A2X_OUTDIR}") || exit ; \ for F in $(LINKMAN_INCLUDE_GENERATED) ; do \ if [ -s "./$$F" ] ; then ln -f -s "../../$$F" "./$${A2X_OUTDIR}/" ; else \ if [ -s "$(abs_srcdir)/$$F" ] ; then ln -f -s "$(abs_srcdir)/$$F" "./$${A2X_OUTDIR}/" ; fi ; fi ; \ @@ -1134,7 +1137,7 @@ DOCBUILD_END = { \ --attribute builddir="$(abs_builddir)/" \ --attribute top_srcdir="$(abs_top_srcdir)/" \ --attribute top_builddir="$(abs_top_builddir)/" \ - -o "$${A2X_OUTDIR}/$(@F)" "$("1m". +# NOTE: MKDIR_P may be defined via expanded $(top_builddir)/install-sh +# so should be run from $(abs_builddir) to be safe, as we jump around +# the build workspace $(abs_top_builddir)/docs/man/.prep-src-docs: $(PREP_SRC) @cd "$(@D)" || exit ; \ linkroot="$(abs_builddir)" ; \ + MAN_SECTIONS_DEFAULT=false ; \ + if [ x"$(MAN_SECTION_API)$(MAN_SECTION_CFG)$(MAN_SECTION_CMD_SYS)$(MAN_SECTION_CMD_USR)" = x3581 ] ; then \ + MAN_SECTIONS_DEFAULT=true ; \ + fi ; \ if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ @@ -1268,10 +1283,20 @@ $(abs_top_builddir)/docs/man/.prep-src-docs: $(PREP_SRC) cd "$(abs_top_builddir)" ; \ fi ;; \ esac ; \ - if ! test -e "$${F}-prepped" ; then \ - touch "$${F}-prepped" || exit ; \ - COUNT="`expr $$COUNT + 1`" ; \ - fi ; \ + if $$MAN_SECTIONS_DEFAULT ; then \ + cat ; \ + else \ + sed \ + -e 's,\(linkman:[^ []*\[\)3\],\1$(MAN_SECTION_API)],g' \ + -e 's,\(linkman:[^ []*\[\)5\],\1$(MAN_SECTION_CFG)],g' \ + -e 's,\(linkman:[^ []*\[\)8\],\1$(MAN_SECTION_CMD_SYS)],g' \ + -e 's,\(linkman:[^ []*\[\)1\],\1$(MAN_SECTION_CMD_USR)],g' \ + -e '1 s,\(^.*(\)3)$$,\1$(MAN_SECTION_API)),g' \ + -e '1 s,\(^.*(\)5)$$,\1$(MAN_SECTION_CFG)),g' \ + -e '1 s,\(^.*(\)8)$$,\1$(MAN_SECTION_CMD_SYS)),g' \ + -e '1 s,\(^.*(\)1)$$,\1$(MAN_SECTION_CMD_USR)),g' ; \ + fi < "$${F}" > "$${F}-prepped" || exit ; \ + COUNT="`expr $$COUNT + 1`" ; \ done ; \ else \ COUNT=30 ; \ @@ -1294,18 +1319,42 @@ $(abs_top_builddir)/docs/man/.prep-src-docs: $(PREP_SRC) cd "$(abs_top_builddir)" ; \ fi ;; \ "$(srcdir)"/*) F="`echo "$$F" | sed 's#^$(srcdir)/*#./#'`" ;; \ + */*) ;; \ + *) \ + linkroot="$(abs_builddir)" ; \ + linksrcroot="$(abs_srcdir)" ; \ + cd "$(abs_top_builddir)" ;; \ esac ; \ D="`dirname "$$F"`" ; \ - $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ + (cd '$(abs_builddir)' && $(MKDIR_P) "$${linkroot}/$$D") || { rm -f "$@.working" ; exit 1 ; } ; \ if ! test -e "$${linkroot}/$$F" && test -s "$${linksrcroot}/$$F" ; then \ echo " LN '$${linksrcroot}/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" >&2 ; \ ln -fs "$${linksrcroot}/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ - if ! test -e "$${linkroot}/$${F}-prepped" ; then \ - touch "$${linkroot}/$${F}-prepped" || { rm -f "$@.working" ; exit 1 ; } ; \ - COUNT="`expr $$COUNT + 1`" ; \ + case "$$F" in \ + *.txt|*.adoc) IS_TEXT=true ;; \ + *.*) IS_TEXT=false ;; \ + *) IS_TEXT=true ;; \ + esac; \ + if $$IS_TEXT ; then \ + grep -w linkman "$${linkroot}/$${F}" > /dev/null || IS_TEXT=false ; \ fi ; \ + if $$MAN_SECTIONS_DEFAULT || ! $$IS_TEXT ; then \ + cat ; \ + else \ + sed \ + -e 's,\(linkman:[^ []*\[\)3\],\1$(MAN_SECTION_API)],g' \ + -e 's,\(linkman:[^ []*\[\)5\],\1$(MAN_SECTION_CFG)],g' \ + -e 's,\(linkman:[^ []*\[\)8\],\1$(MAN_SECTION_CMD_SYS)],g' \ + -e 's,\(linkman:[^ []*\[\)1\],\1$(MAN_SECTION_CMD_USR)],g' \ + -e '1 s,\(^.*(\)3)$$,\1$(MAN_SECTION_API)),g' \ + -e '1 s,\(^.*(\)5)$$,\1$(MAN_SECTION_CFG)),g' \ + -e '1 s,\(^.*(\)8)$$,\1$(MAN_SECTION_CMD_SYS)),g' \ + -e '1 s,\(^.*(\)1)$$,\1$(MAN_SECTION_CMD_USR)),g' ; \ + fi < "$${linkroot}/$${F}" > "$${linkroot}/$${F}-prepped" \ + || { rm -f "$@.working" ; exit 1 ; } ; \ + COUNT="`expr $$COUNT + 1`" ; \ done ; \ fi ; \ if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi diff --git a/docs/nut.dict b/docs/nut.dict index 1cc4c8f6cf..d003824ac9 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3270 utf-8 +personal_ws-1.1 en 3274 utf-8 AAC AAS ABI @@ -1486,6 +1486,7 @@ apcsmart apctest apcupsd aphel +api apinames appveyor ar @@ -1718,6 +1719,7 @@ cppnit cppunit cpqpower cpsups +cpu cr crestfactor crit @@ -2866,6 +2868,7 @@ something's sp spanish sparc +sparcv spectype spellcheck splitaddr diff --git a/drivers/apc-mib.c b/drivers/apc-mib.c index 78924e31c3..2a1b9c3b39 100644 --- a/drivers/apc-mib.c +++ b/drivers/apc-mib.c @@ -29,7 +29,7 @@ #define APCC_MIB_VERSION "1.60" #define APC_UPS_DEVICE_MODEL ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" -/* FIXME: Find a better oid_auto_check vs sysOID for this one? */ +/* FIXME: Find a better oid_auto_check vs. sysOID for this one? */ #define APC_UPS_SYSOID APC_UPS_DEVICE_MODEL /* Other APC sysOID: diff --git a/drivers/bcmxcp_usb.c b/drivers/bcmxcp_usb.c index 9b66aef8e0..ceec60327d 100644 --- a/drivers/bcmxcp_usb.c +++ b/drivers/bcmxcp_usb.c @@ -231,7 +231,7 @@ ssize_t get_answer(unsigned char *data, unsigned char command) /* Now validate XCP frame */ /* Check header */ if ( my_buf[0] != PW_COMMAND_START_BYTE ) { - upsdebugx(2, "get_answer: wrong header 0xab vs %02x", my_buf[0]); + upsdebugx(2, "get_answer: wrong header 0xab vs. %02x", my_buf[0]); /* Sometime we read something wrong. bad cables? bad ports? */ my_buf = memchr(my_buf, PW_COMMAND_START_BYTE, bytes_read); if (!my_buf) diff --git a/drivers/blazer_ser.c b/drivers/blazer_ser.c index e33a455d24..654315d015 100644 --- a/drivers/blazer_ser.c +++ b/drivers/blazer_ser.c @@ -95,7 +95,7 @@ ssize_t blazer_command(const char *cmd, char *buf, size_t buflen) continue; } - /* TODO: Range-check int vs ssize_t values */ + /* TODO: Range-check int vs. ssize_t values */ return (ssize_t)snprintf(buf, buflen, "%s", testing[i].answer); } diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index 826eb78176..a6551f87b1 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -544,7 +544,7 @@ ssize_t blazer_command(const char *cmd, char *buf, size_t buflen) continue; } - /* TODO: Range-check int vs ssize_t values */ + /* TODO: Range-check int vs. ssize_t values */ return (ssize_t)snprintf(buf, buflen, "%s", testing[i].answer); } diff --git a/drivers/delta_ups-hid.c b/drivers/delta_ups-hid.c index 49d5af93fb..e544a23b93 100644 --- a/drivers/delta_ups-hid.c +++ b/drivers/delta_ups-hid.c @@ -178,7 +178,7 @@ static hid_info_t delta_ups_hid2nut[] = { { "input.transfer.low.max", 0, 0, "UPS.PowerConverter.Output.DeltaConfigTransferLowMax", NULL, "%.1f", HU_FLAG_STATIC, NULL }, { "input.transfer.high.min", 0, 0, "UPS.PowerConverter.Output.DeltaConfigTransferHighMin", NULL, "%.1f", HU_FLAG_STATIC, NULL }, { "input.transfer.high.max", 0, 0, "UPS.PowerConverter.Output.DeltaConfigTransferHighMax", NULL, "%.1f", HU_FLAG_STATIC, NULL }, - /* FIXME: Check vs hardware, is this an "input" or "outlet/outpu" value after all? */ + /* FIXME: Check vs. hardware, is this an "input" or "outlet/outpu" value after all? */ { "input.source", 0, 0, "UPS.OutletSystem.Outlet.DeltaOutputSource", NULL, "%s", 0, delta_ups_output_source_info }, { "input.frequency", 0, 0, "UPS.PowerConverter.Input.Frequency", NULL, "%.1f", HU_FLAG_QUICK_POLL, NULL }, diff --git a/drivers/dstate.c b/drivers/dstate.c index 933231d979..ab7e3db699 100644 --- a/drivers/dstate.c +++ b/drivers/dstate.c @@ -1737,7 +1737,7 @@ void alarm_set(const char *buf) if (ret < 0) { /* Should we also try to print the potentially unusable buf? * Generally - likely not. But if it is short enough... - * Note: LARGEBUF was the original limit mismatched vs alarm_buf + * Note: LARGEBUF was the original limit mismatched vs. alarm_buf * size before PR #986. */ char alarm_tmp[LARGEBUF]; diff --git a/drivers/hidparser.c b/drivers/hidparser.c index e87addd987..2132dba053 100644 --- a/drivers/hidparser.c +++ b/drivers/hidparser.c @@ -571,7 +571,7 @@ HIDData_t *FindObject_with_ID_Node(HIDDesc_t *pDesc_arg, uint8_t ReportID, HIDNo void GetValue(const unsigned char *Buf, HIDData_t *pData, long *pValue) { /* Note: https://github.com/networkupstools/nut/issues/1023 - This conversion code can easily be sensitive to 32- vs 64- bit + This conversion code can easily be sensitive to 32- vs. 64- bit compilation environments. Consider the possibility of overflow in 32-bit representations when computing with extreme values, for example LogMax-LogMin+1. diff --git a/drivers/nutdrv_qx_voltronic.c b/drivers/nutdrv_qx_voltronic.c index 23e932f5c6..86b4764fe4 100644 --- a/drivers/nutdrv_qx_voltronic.c +++ b/drivers/nutdrv_qx_voltronic.c @@ -1009,7 +1009,7 @@ static item_t voltronic_qx2nut[] = { { "input.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 32, 34, "%.1f", QX_FLAG_STATIC, NULL, NULL, NULL }, { "output.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 36, 38, "%.1f", QX_FLAG_STATIC, NULL, NULL, NULL }, /* redundant with value from QRI */ /* { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QMD\r", "", 48, '(', "", 40, 41, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, NULL, voltronic_batt_numb }, *//* redundant with value from QBV */ -/* { "battery.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 43, 46, "%.1f", QX_FLAG_STATIC, NULL, NULL, NULL }, *//* as *per battery* vs *per pack* reported by QRI */ +/* { "battery.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 43, 46, "%.1f", QX_FLAG_STATIC, NULL, NULL, NULL }, *//* as *per battery* vs. *per pack* reported by QRI */ /* Query UPS for ratings * > [F\r] diff --git a/scripts/Solaris/Makefile.am b/scripts/Solaris/Makefile.am index 3fad462879..93f4b625be 100644 --- a/scripts/Solaris/Makefile.am +++ b/scripts/Solaris/Makefile.am @@ -73,10 +73,16 @@ endif cd $(PROTOTYPE_DIR) && rm -f prototype1 cd $(PROTOTYPE_DIR) && ./makelocal.sh cp $(PROTOTYPE_DIR)/*.gz $(builddir) - UNAME_P="`uname -p`" && case "$${UNAME_P}" in \ - i386|sparc) \ - mv -f NUT_solaris_package.local.gz "$(abs_top_builddir)/NUT_solaris_$${UNAME_P}_package@PACKAGE_VERSION@.local.gz" ;; \ - esac + ISANAME=''; case x"$(target_cpu)" in \ + xi386|xsparc|xsparcv9|xamd64) ISANAME='$(target_cpu)' ;; \ + xx86_64) ISANAME='amd64' ;; \ + xi686) ISANAME='i386' ;; \ + xsparcv7)ISANAME='sparc' ;; \ + x) UNAME_P="`uname -p`" && ISANAME="$${UNAME_P}" ;; \ + esac ; \ + if [ -n "$${ISANAME}" ] ; then \ + mv -f NUT_solaris_package.local.gz "$(abs_top_builddir)/NUT_solaris_$${ISANAME}_package-@PACKAGE_VERSION@.local.gz" ; \ + fi # TODO: Define support for IPS packaging (provide p5m files and make rules) package-solaris-ips: diff --git a/scripts/Solaris/nut-driver-enumerator.xml.in b/scripts/Solaris/nut-driver-enumerator.xml.in index fc5097a410..afce93201f 100644 --- a/scripts/Solaris/nut-driver-enumerator.xml.in +++ b/scripts/Solaris/nut-driver-enumerator.xml.in @@ -68,23 +68,35 @@ --> + type='method' + name='start' + exec='@NUT_LIBEXECDIR@/nut-driver-enumerator.sh' + timeout_seconds='0'> + + + + + + + type='method' + name='refresh' + exec='@NUT_LIBEXECDIR@/nut-driver-enumerator.sh' + timeout_seconds='0'> + + + + + + + type='method' + name='stop' + exec='/bin/true' + timeout_seconds='60' /> + type='method' + name='start' + exec='@NUT_LIBEXECDIR@/nut-driver-enumerator.sh --daemon-after' + timeout_seconds='0'> + + + + + + + type='method' + name='refresh' + exec=':kill -SIGHUP' + timeout_seconds='0'/> + type='method' + name='stop' + exec=':kill' + timeout_seconds='60' />