From 3ba711912801f482b8e767ae839d3598ff5f2250 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 11:59:11 +0000 Subject: [PATCH 01/56] tools/gitlog2changelog.py.in: allow to customize CHANGELOG_FILE Signed-off-by: Jim Klimov --- tools/gitlog2changelog.py.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/gitlog2changelog.py.in b/tools/gitlog2changelog.py.in index f4c1fd3c1f..95ded513fd 100755 --- a/tools/gitlog2changelog.py.in +++ b/tools/gitlog2changelog.py.in @@ -54,6 +54,15 @@ except TypeError: fin_mode = 2 fin_chop = 1 +# Create a ChangeLog file in the current directory by default. +CHANGELOG_FILE = "ChangeLog" +try: + # e.g. point from Makefile to a builddir (caller ensures it exists) + if os.environ.get("CHANGELOG_FILE", None) is not None: + CHANGELOG_FILE = os.environ.get("CHANGELOG_FILE") +except Exception as ignored: + pass + # Create a ChangeLog file in the current directory. if fin_mode == 3: fout = open("ChangeLog", "w", encoding="UTF-8") From 991a66b07513c787595f07bc0552d356bbd34355 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 11:59:38 +0000 Subject: [PATCH 02/56] tools/gitlog2changelog.py.in: allow to use CHANGELOG_FILE="-" for redirect to stdout Signed-off-by: Jim Klimov --- tools/gitlog2changelog.py.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/gitlog2changelog.py.in b/tools/gitlog2changelog.py.in index 95ded513fd..a5e4d78660 100755 --- a/tools/gitlog2changelog.py.in +++ b/tools/gitlog2changelog.py.in @@ -63,11 +63,13 @@ try: except Exception as ignored: pass -# Create a ChangeLog file in the current directory. -if fin_mode == 3: - fout = open("ChangeLog", "w", encoding="UTF-8") +if CHANGELOG_FILE == "-": + fout = sys.stdout else: - fout = open("ChangeLog", "w") + if fin_mode == 3: + fout = open(CHANGELOG_FILE, "w", encoding="UTF-8") + else: + fout = open(CHANGELOG_FILE, "w") # Set up the loop variables in order to locate the blocks we want authorFound = False From 4c2fde9af1c42f853d8903c59d95e7d568c8c163 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 11:38:13 +0000 Subject: [PATCH 03/56] Makefile.am: add a shortcut to "make ChangeLog.adoc"; fix formal markup if we "failed to generate the ChangeLog" to produce a sane adoc=>pdf note anyway Signed-off-by: Jim Klimov --- Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index e7f9210e98..be1d4968e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -318,7 +318,10 @@ dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp cd $(top_builddir) && \ ./tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ - { echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ ; } + { printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > $@ ; } + +ChangeLog.adoc: ChangeLog + cd $(abs_top_builddir)/docs && $(MAKE) ../ChangeLog.adoc nut_version.h include/nut_version.h: cd $(abs_top_builddir)/include && $(MAKE) nut_version.h From acc0a6dae3eaf6b8e42a816684133f134e18300b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 12:01:01 +0000 Subject: [PATCH 04/56] Makefile.am: call tools/gitlog2changelog.py in SOURCE dir (where git repo is) and use CHANGELOG_FILE to store the result in BUILD dir Signed-off-by: Jim Klimov --- Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index be1d4968e8..190c34e4d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -313,12 +313,14 @@ GITLOG_START_POINT=v2.6.0 # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously -# Note that the script is hard-coded to generate "ChangeLog" in the current dir +# Note that the script is hard-coded to inspect Git workspace which contains +# the current dir, and defaults to generate a "ChangeLog" in the current dir. +# The script itself is generated from a template, so resides in builddir. dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - cd $(top_builddir) && \ - ./tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ - { printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > $@ ; } + cd $(abs_top_srcdir) && \ + CHANGELOG_FILE="$@" $(abs_top_builddir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ + { printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; } ChangeLog.adoc: ChangeLog cd $(abs_top_builddir)/docs && $(MAKE) ../ChangeLog.adoc From b3a5c55675c1d70de1ba0fbfd82f19d5ccf19bd4 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 18:04:18 +0000 Subject: [PATCH 05/56] Makefile.am: ChangeLog: re-use one from tarball when not building from git Signed-off-by: Jim Klimov --- Makefile.am | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 190c34e4d7..a99ac49f9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -319,8 +319,14 @@ GITLOG_START_POINT=v2.6.0 dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp cd $(abs_top_srcdir) && \ - CHANGELOG_FILE="$@" $(abs_top_builddir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ - { printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; } + if test -e .git ; then \ + CHANGELOG_FILE="$@" $(abs_top_builddir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ + { printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; } ; \ + else \ + if ! test -s "$@" ; then \ + printf "Failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; \ + fi ; \ + fi ChangeLog.adoc: ChangeLog cd $(abs_top_builddir)/docs && $(MAKE) ../ChangeLog.adoc From 725b667dc3c3388a461e7439c5c1e207b032f325 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 13:06:11 +0000 Subject: [PATCH 06/56] docs/Makefile.am: do not make a "NOTE:..." line into a heading Signed-off-by: Jim Klimov --- docs/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index 1a9a4732a0..bb072531b2 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -249,6 +249,7 @@ $(top_builddir)/ChangeLog.adoc: $(top_builddir)/ChangeLog && TABCHAR="`printf '\t'`" \ && $(SED) \ -e 's,^\([0-9a-zA-Z]\),=== \1,' \ + -e 's,^=== \(NOTE: \),\1,' \ -e 's,/[+],/\\\\\+,g' \ -e 's,[+][+],\\\+\\\+,g' \ -e 's,^\([ '"$${TABCHAR}"'][^+]*\)\([^+/\]\)[+],\1\2\\\+,g' \ From 0506cc01ca26f044101cf64e6e8aac0b67b74c38 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 13:39:14 +0000 Subject: [PATCH 07/56] docs/Makefile.am, docs/man/Makefile.am: augment with .prep-src-docs target for building out-of-tree Signed-off-by: Jim Klimov --- docs/Makefile.am | 90 +++++++++++++++++++++++++++++++++----------- docs/man/Makefile.am | 66 ++++++++++++++++++++++++++++---- 2 files changed, 126 insertions(+), 30 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index bb072531b2..94dd42c7ac 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -131,20 +131,27 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # This list is defined by configure script choices and options: -doc: @DOC_BUILD_LIST@ +doc: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS) @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): -docs: pdf html-single html-chunked man-man html-man +docs: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS) pdf html-single html-chunked man-man html-man all-docs: docs check-docs: check-pdf check-html-single check-html-chunked check-man -pdf: $(ASCIIDOC_PDF) +pdf: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_PDF) + # also build the HTML manpages with these targets -html-single: $(ASCIIDOC_HTML_SINGLE) -html-chunked: $(ASCIIDOC_HTML_CHUNKED) +html-single: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_SINGLE) + +html-chunked: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_CHUNKED) # the "for" loops might better use $^ but it might be not portable check-pdf: $(ASCIIDOC_PDF) @@ -182,19 +189,15 @@ check-html-chunked: $(ASCIIDOC_HTML_CHUNKED) # chosen during configure script execution. The "all-man" and "all-html" # rules build everything documented. check-man all-man man-man all-html html-man: - cd $(top_builddir)/docs/man/ && $(MAKE) -f Makefile $@ + cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ man: - cd $(top_builddir)/docs/man/ && $(MAKE) -f Makefile all + cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css docinfo.xml.in.tmp CLEANFILES += $(top_builddir)/INSTALL.nut $(top_builddir)/UPGRADING $(top_builddir)/NEWS $(top_builddir)/ChangeLog.adoc $(top_builddir)/README CLEANFILES += $(top_builddir)/*.adoc-parsed *.adoc-parsed -# Dirs to clean -clean-local: - $(AM_V_at)rm -rf *.chunked *.bak tmp - ### TODO: general automatic dependency generation # Prepare text files (currently a manually tracked list) @@ -325,6 +328,7 @@ 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. DOCBUILD_BEGIN = { \ + if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi ; \ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ rm -rf "./$${A2X_OUTDIR}" || true ; \ test -d "$@" && rm -rf "$@" || true ; \ @@ -365,7 +369,7 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. -*.html: common.xsl xhtml.xsl +*.html: common.xsl xhtml.xsl .prep-src-docs .txt.html: @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ echo " DOC-HTML Generating $@"; \ @@ -373,7 +377,7 @@ DOCBUILD_END = { \ $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES -*.chunked: common.xsl chunked.xsl +*.chunked: common.xsl chunked.xsl .prep-src-docs .txt.chunked: @A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \ echo " DOC-HTML-CHUNKED Generating $@"; \ @@ -382,7 +386,7 @@ DOCBUILD_END = { \ $(DOCBUILD_END) ; exit $$RES # Note: non-HTML a2x modes may ignore the destination directory -*.pdf: docinfo.xml +*.pdf: docinfo.xml .prep-src-docs .txt.pdf: @A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \ echo " DOC-PDF Generating $@"; \ @@ -390,6 +394,16 @@ DOCBUILD_END = { \ $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES +# Used below for spellcheck and for .prep-src-docs +SPELLCHECK_SRC_DEFAULT = $(ALL_TXT_SRC) \ + asciidoc-vars.conf \ + ../README.adoc ../NEWS.adoc \ + ../INSTALL.nut.adoc ../UPGRADING.adoc \ + ../TODO.adoc ../scripts/ufw/README.adoc \ + ../scripts/augeas/README.adoc ../lib/README.adoc \ + ../tools/nut-scanner/README.adoc \ + ../AUTHORS ../COPYING ../LICENSE-GPL2 ../LICENSE-GPL3 ../LICENSE-DCO + if HAVE_ASPELL # Non-interactively spell check all documentation source files. # This is useful for Buildbot and automated QA processing @@ -400,14 +414,7 @@ if HAVE_ASPELL # tracked as a source file by NUT Git repository. # Note that `docs/asciidoc-vars.conf` is included into docs and so impacts # their resulting spellcheck verdicts. -SPELLCHECK_SRC = $(ALL_TXT_SRC) \ - asciidoc-vars.conf \ - ../README.adoc ../NEWS.adoc \ - ../INSTALL.nut.adoc ../UPGRADING.adoc \ - ../TODO.adoc ../scripts/ufw/README.adoc \ - ../scripts/augeas/README.adoc ../lib/README.adoc \ - ../tools/nut-scanner/README.adoc \ - ../AUTHORS ../COPYING ../LICENSE-GPL2 ../LICENSE-GPL3 ../LICENSE-DCO +SPELLCHECK_SRC = $(SPELLCHECK_SRC_DEFAULT) # Directory SPELLCHECK_SRC files are relative to. Overriden by other Makefiles. SPELLCHECK_SRCDIR = $(srcdir) @@ -593,4 +600,43 @@ spellcheck-interactive: @echo "Documentation spell check not available since 'aspell' was not found." endif !HAVE_ASPELL + +# When building out-of-tree, be sure to have all asciidoc resources +# under the same dir structure (tool limitation) +PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) +.prep-src-docs: $(PREP_SRC) + @if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + COUNT=30 ; \ + touch "$@.$$$$" ; \ + while test -e "$@.working" -a "$$COUNT" -gt 0 ; do sleep 1; COUNT="`expr $$COUNT - 1`"; done ; \ + touch "$@.working" ; \ + if test -n "`find "$@" -newer "$@.$$$$" 2>/dev/null`" ; then \ + rm -f "$@.$$$$" "$@.working" ; \ + exit 0; \ + fi ; \ + rm -f "$@.$$$$" ; \ + COUNT=0; \ + for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + D="`dirname "$$F"`" ; \ + $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -s "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ + echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F'" >&2 ; \ + ln -fs "$(srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + COUNT="`expr $$COUNT + 1`" ; \ + fi ; \ + done ; \ + if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi ; \ + fi + @rm -f "$@.working" + +# Dirs to clean, etc. +clean-local: + $(AM_V_at)rm -rf *.chunked *.bak tmp + $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + for F in $(PREP_SRC) ; do \ + rm -f "$(builddir)/$$F" ; \ + done ; \ + rm -f "$(builddir)/.prep-src-docs"*; \ + fi + .PHONY: html html-chunked html-single pdf man diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index de22f78916..64036323df 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -875,11 +875,15 @@ DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) all: -all-html html-man: $(HTML_MANS) index.html +# Sub-make to fully process prep first, and only then go to actual make +# (maybe parallel) with unambiguously defined sources and targets +all-html html-man: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS_X) $(HTML_MANS) index.html # Have a way to build all man pages, not just those that fit currently # configured drivers, daemons, developer aspect, etc. -all-man man-man: $(MAN_MANS) +all-man man-man: .prep-src-docs + $(MAKE) $(AM_MAKEFLAGS_X) $(MAN_MANS) if WITH_MANS if ! SKIP_MANS @@ -943,7 +947,7 @@ check-man-txt: $(SRC_ALL_PAGES) echo "FAILED man-source sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ fi; echo "PASSED man-source sanity check (checked $$CHECKED files)"; exit 0 -CLEANFILES = *-spellchecked +CLEANFILES = *-spellchecked .prep-src-docs SUFFIXES = .txt .html .1 .3 .5 .8 @@ -964,6 +968,7 @@ CLEANFILES += *.1 *.3 *.5 *.8 *.xml *.html *.pdf # Working around a2x not friendly to parallelized runs. # See more details in the main NUT docs/Makefile.am DOCBUILD_BEGIN = { \ + if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS_X) .prep-src-docs ; fi ; \ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ rm -rf "./$${A2X_OUTDIR}" || true ; \ test -d "$@" && rm -rf "$@" || true ; \ @@ -978,11 +983,6 @@ DOCBUILD_BEGIN = { \ && ! test -w "${builddir}/docbook-xsl.css" \ ; then chmod u+w "${builddir}/docbook-xsl.css" ; fi ; \ chmod -R u+w "./$${A2X_OUTDIR}" || true ; \ - if test x"$(srcdir)" != x"$(builddir)" ; then \ - if ! test -s "$(builddir)/$<" && test -s "$(srcdir)/`basename $<`" ; then \ - ln -fs "$(srcdir)/`basename $<`" "$(builddir)/" ; \ - fi ; \ - fi ; \ A2X_VERBOSE="$(ASCIIDOC_VERBOSE)"; if [ "$(V)" = 1 ]; then A2X_VERBOSE="--verbose"; fi; \ } @@ -1002,6 +1002,19 @@ DOCBUILD_END = { \ fi ; \ } +# PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with +# prerequisites like done below, and GNU Make of some versions complains; +# https://www.gnu.org/software/make/manual/html_node/Error-Messages.html +# says the prerequisites were ignored while a suffix rule was created; +# eventually the POSIX stance would be taken to define a rule for a weird +# verbatim target file name with prerequisites: +# ../docs/Makefile:936: warning: ignoring prerequisites on suffix rule definition +# Changes from ".txt.pdf: docinfo.xml" to "*.pdf: docinfo.xml" = ".txt.pdf:" +# as done below may be pointless in the end (with regard to a portable way +# to trigger builds by a changed dependency), but at least predictable and +# not toxic. +#*.html *.1 *.3 *.5 *.8: .prep-src-docs + ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we ### see the relative builddir as "." in the makefile, for included @@ -1127,7 +1140,44 @@ endif !HAVE_ASCIIDOC spellcheck spellcheck-interactive spellcheck-sortdict: $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# When building out-of-tree, be sure to have all asciidoc resources +# under the same dir structure (tool limitation) +# NOTE: Not including *all* of EXTRA_DIST here, because we also "dist" +# the built man pages in the tarball for end-users without an asciidoc +# stack (causing a dependency loop)! +PREP_SRC = $(SRC_ALL_PAGES) asciidoc.conf +.prep-src-docs: $(PREP_SRC) + @if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + COUNT=30 ; \ + touch "$@.$$$$" ; \ + while test -e "$@.working" -a "$$COUNT" -gt 0 ; do sleep 1; COUNT="`expr $$COUNT - 1`"; done ; \ + touch "$@.working" ; \ + if test -n "`find "$@" -newer "$@.$$$$" 2>/dev/null`" ; then \ + rm -f "$@.$$$$" "$@.working" ; \ + exit 0; \ + fi ; \ + rm -f "$@.$$$$" ; \ + COUNT=0; \ + for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + D="`dirname "$$F"`" ; \ + $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -e "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ + echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F'" >&2 ; \ + ln -fs "$(srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + COUNT="`expr $$COUNT + 1`" ; \ + fi ; \ + done ; \ + if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi ; \ + fi + @rm -f "$@.working" + MAINTAINERCLEANFILES = Makefile.in .dirstamp clean-local: $(AM_V_at)rm -rf tmp + $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + for F in $(PREP_SRC) ; do \ + rm -f "$(builddir)/$$F" ; \ + done ; \ + rm -f "$(builddir)/.prep-src-docs"*; \ + fi From 8cb20fcc3ca3b1b20ff0a434ef01e44c17afdadd Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 16:19:46 +0000 Subject: [PATCH 08/56] docs/Makefile.am, docs/man/Makefile.am: report "Preparing to generate" separately from actually "Generating" Signed-off-by: Jim Klimov --- docs/Makefile.am | 9 ++++++--- docs/man/Makefile.am | 15 ++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 94dd42c7ac..77e3507dcc 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -372,16 +372,18 @@ DOCBUILD_END = { \ *.html: common.xsl xhtml.xsl .prep-src-docs .txt.html: @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ - echo " DOC-HTML Generating $@"; \ + echo " DOC-HTML Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-HTML Generating $@"; \ $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES *.chunked: common.xsl chunked.xsl .prep-src-docs .txt.chunked: @A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \ - echo " DOC-HTML-CHUNKED Generating $@"; \ + echo " DOC-HTML-CHUNKED Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-HTML-CHUNKED Generating $@"; \ $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked --xsl-file=$(srcdir)/chunked.xsl $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES @@ -389,8 +391,9 @@ DOCBUILD_END = { \ *.pdf: docinfo.xml .prep-src-docs .txt.pdf: @A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \ - echo " DOC-PDF Generating $@"; \ + echo " DOC-PDF Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-PDF Generating $@"; \ $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 64036323df..cf1831f9d6 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1024,8 +1024,9 @@ DOCBUILD_END = { \ ### string resolve meaningfully in the filesystem during docs build. .txt.html: @A2X_OUTDIR="tmp/man-html.$(@F).$$$$" ; \ - echo " DOC-MAN-HTML Generating $@"; \ + echo " DOC-MAN-HTML Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-MAN-HTML Generating $@"; \ $(ASCIIDOC) --backend=xhtml11 $${A2X_VERBOSE} \ --attribute localdate="`TZ=UTC date +%Y-%m-%d`" \ --attribute localtime="`TZ=UTC date +%H:%M:%S`" \ @@ -1052,29 +1053,33 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ .txt.1: @A2X_OUTDIR="tmp/man1.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ + echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-MAN Generating $@"; \ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES .txt.3: @A2X_OUTDIR="tmp/man3.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ + echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-MAN Generating $@"; \ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES .txt.5: @A2X_OUTDIR="tmp/man5.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ + echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-MAN Generating $@"; \ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES .txt.8: @A2X_OUTDIR="tmp/man8.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ + echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ + echo " DOC-MAN Generating $@"; \ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ $(DOCBUILD_END) ; exit $$RES From bc36e2e7c5191ecbf6f282c5cc2cd07fad69d955 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 16:44:59 +0000 Subject: [PATCH 09/56] docs/Makefile.am, Makefile.am: explicitly "make .prep-src-docs" before calling (possibly parallel) sub-make for docs or docs/man Signed-off-by: Jim Klimov --- Makefile.am | 2 ++ docs/Makefile.am | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index a99ac49f9b..e00c3eae05 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,6 +164,8 @@ spellcheck spellcheck-interactive: doc spellcheck-sortdict \ all-docs check-docs \ man all-man man-man check-man man-html all-html: + cd $(builddir)/docs/man && $(MAKE) .prep-src-docs + cd $(builddir)/docs && $(MAKE) .prep-src-docs cd $(builddir)/docs && $(MAKE) $@ INSTALL.nut UPGRADING NEWS README: diff --git a/docs/Makefile.am b/docs/Makefile.am index 77e3507dcc..e34febf019 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -189,10 +189,10 @@ check-html-chunked: $(ASCIIDOC_HTML_CHUNKED) # chosen during configure script execution. The "all-man" and "all-html" # rules build everything documented. check-man all-man man-man all-html html-man: - cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ + cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ man: - cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all + cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css docinfo.xml.in.tmp CLEANFILES += $(top_builddir)/INSTALL.nut $(top_builddir)/UPGRADING $(top_builddir)/NEWS $(top_builddir)/ChangeLog.adoc $(top_builddir)/README From 320387258bdca34fa32f5ac28687283b5824d62a Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 17:37:57 +0000 Subject: [PATCH 10/56] docs/Makefile.am, docs/man/Makefile.am: prefix sub-make calls with "+" to invoke jobserver Signed-off-by: Jim Klimov --- docs/Makefile.am | 22 +++++++++++----------- docs/man/Makefile.am | 18 +++++++++--------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index e34febf019..2792a3b404 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -132,26 +132,26 @@ check-local: $(CHECK_LOCAL_TARGETS) # This list is defined by configure script choices and options: doc: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS) @DOC_BUILD_LIST@ + +$(MAKE) $(AM_MAKEFLAGS) @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): docs: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS) pdf html-single html-chunked man-man html-man + +$(MAKE) $(AM_MAKEFLAGS) pdf html-single html-chunked man-man html-man all-docs: docs check-docs: check-pdf check-html-single check-html-chunked check-man pdf: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_PDF) + +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_PDF) # also build the HTML manpages with these targets html-single: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_SINGLE) + +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_SINGLE) html-chunked: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_CHUNKED) + +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_CHUNKED) # the "for" loops might better use $^ but it might be not portable check-pdf: $(ASCIIDOC_PDF) @@ -189,10 +189,10 @@ check-html-chunked: $(ASCIIDOC_HTML_CHUNKED) # chosen during configure script execution. The "all-man" and "all-html" # rules build everything documented. check-man all-man man-man all-html html-man: - cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ + +cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ man: - cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all + +cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css docinfo.xml.in.tmp CLEANFILES += $(top_builddir)/INSTALL.nut $(top_builddir)/UPGRADING $(top_builddir)/NEWS $(top_builddir)/ChangeLog.adoc $(top_builddir)/README @@ -230,7 +230,7 @@ DOCBUILD_CONVERT_GITHUB_LINKS = { \ @$(DOCBUILD_CONVERT_GITHUB_LINKS) $(top_builddir)/ChangeLog: - @echo " DOC-CHANGELOG-GENERATE $@" \ + +@echo " DOC-CHANGELOG-GENERATE $@" \ && cd $(top_builddir) && $(MAKE) $(AM_FLAGS) $(@F) # BSD Make dislikes the path resolution here and does not always populate "$<" @@ -371,7 +371,7 @@ DOCBUILD_END = { \ # not toxic. *.html: common.xsl xhtml.xsl .prep-src-docs .txt.html: - @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ echo " DOC-HTML Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-HTML Generating $@"; \ @@ -380,7 +380,7 @@ DOCBUILD_END = { \ *.chunked: common.xsl chunked.xsl .prep-src-docs .txt.chunked: - @A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \ echo " DOC-HTML-CHUNKED Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-HTML-CHUNKED Generating $@"; \ @@ -390,7 +390,7 @@ DOCBUILD_END = { \ # Note: non-HTML a2x modes may ignore the destination directory *.pdf: docinfo.xml .prep-src-docs .txt.pdf: - @A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \ echo " DOC-PDF Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-PDF Generating $@"; \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index cf1831f9d6..9c6ba45c33 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -878,12 +878,12 @@ all: # Sub-make to fully process prep first, and only then go to actual make # (maybe parallel) with unambiguously defined sources and targets all-html html-man: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS_X) $(HTML_MANS) index.html + +$(MAKE) $(AM_MAKEFLAGS_X) $(HTML_MANS) index.html # Have a way to build all man pages, not just those that fit currently # configured drivers, daemons, developer aspect, etc. all-man man-man: .prep-src-docs - $(MAKE) $(AM_MAKEFLAGS_X) $(MAN_MANS) + +$(MAKE) $(AM_MAKEFLAGS_X) $(MAN_MANS) if WITH_MANS if ! SKIP_MANS @@ -1052,7 +1052,7 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ --destination-dir="$${A2X_OUTDIR}" .txt.1: - @A2X_OUTDIR="tmp/man1.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/man1.$(@F).$$$$" ; \ echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-MAN Generating $@"; \ @@ -1060,7 +1060,7 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ $(DOCBUILD_END) ; exit $$RES .txt.3: - @A2X_OUTDIR="tmp/man3.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/man3.$(@F).$$$$" ; \ echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-MAN Generating $@"; \ @@ -1068,7 +1068,7 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ $(DOCBUILD_END) ; exit $$RES .txt.5: - @A2X_OUTDIR="tmp/man5.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/man5.$(@F).$$$$" ; \ echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-MAN Generating $@"; \ @@ -1076,7 +1076,7 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ $(DOCBUILD_END) ; exit $$RES .txt.8: - @A2X_OUTDIR="tmp/man8.$(@F).$$$$" ; \ + @+A2X_OUTDIR="tmp/man8.$(@F).$$$$" ; \ echo " DOC-MAN Preparing to generate $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ echo " DOC-MAN Generating $@"; \ @@ -1134,16 +1134,16 @@ endif !HAVE_ASCIIDOC # NOTE: Due to portability, we do not use a GNU percent-wildcard extension: #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *.txt-spellchecked: Makefile.am $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .txt.txt-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # When building out-of-tree, be sure to have all asciidoc resources # under the same dir structure (tool limitation) From ca48b52a3278ff81233ebe2c990d3e2bdb59dd28 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 17:49:40 +0000 Subject: [PATCH 11/56] docs/Makefile.am, docs/man/Makefile.am: PREP_SRC: symlink from abs_srcdir to avoid the mess with relative paths and ".." offsets Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 2792a3b404..db66955766 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -624,7 +624,7 @@ PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ if ! test -s "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F'" >&2 ; \ - ln -fs "$(srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + ln -fs "$(abs_srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ done ; \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 9c6ba45c33..c640ed06e8 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1168,7 +1168,7 @@ PREP_SRC = $(SRC_ALL_PAGES) asciidoc.conf $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ if ! test -e "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F'" >&2 ; \ - ln -fs "$(srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + ln -fs "$(abs_srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ done ; \ From edc1fabeacba3491a26ae4830dd9e05b04709c4f Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 21:30:50 +0000 Subject: [PATCH 12/56] docs/Makefile.am, docs/man/Makefile.am: do not hard-depend common targets on .prep-src-docs Signed-off-by: Jim Klimov --- docs/Makefile.am | 15 ++++++++++----- docs/man/Makefile.am | 12 +++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index db66955766..34025547fc 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -131,26 +131,31 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # This list is defined by configure script choices and options: -doc: .prep-src-docs +doc: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi +$(MAKE) $(AM_MAKEFLAGS) @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): -docs: .prep-src-docs +docs: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi +$(MAKE) $(AM_MAKEFLAGS) pdf html-single html-chunked man-man html-man all-docs: docs check-docs: check-pdf check-html-single check-html-chunked check-man -pdf: .prep-src-docs +pdf: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_PDF) # also build the HTML manpages with these targets -html-single: .prep-src-docs +html-single: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_SINGLE) -html-chunked: .prep-src-docs +html-chunked: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_CHUNKED) # the "for" loops might better use $^ but it might be not portable diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index c640ed06e8..ce72931ef1 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -877,13 +877,15 @@ all: # Sub-make to fully process prep first, and only then go to actual make # (maybe parallel) with unambiguously defined sources and targets -all-html html-man: .prep-src-docs - +$(MAKE) $(AM_MAKEFLAGS_X) $(HTML_MANS) index.html +all-html html-man: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi + +$(MAKE) $(AM_MAKEFLAGS) $(HTML_MANS) index.html # Have a way to build all man pages, not just those that fit currently # configured drivers, daemons, developer aspect, etc. -all-man man-man: .prep-src-docs - +$(MAKE) $(AM_MAKEFLAGS_X) $(MAN_MANS) +all-man man-man: + +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi + +$(MAKE) $(AM_MAKEFLAGS) $(MAN_MANS) if WITH_MANS if ! SKIP_MANS @@ -968,7 +970,7 @@ CLEANFILES += *.1 *.3 *.5 *.8 *.xml *.html *.pdf # Working around a2x not friendly to parallelized runs. # See more details in the main NUT docs/Makefile.am DOCBUILD_BEGIN = { \ - if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS_X) .prep-src-docs ; fi ; \ + if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi ; \ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ rm -rf "./$${A2X_OUTDIR}" || true ; \ test -d "$@" && rm -rf "$@" || true ; \ From 6a0181a13c76ced7f7cac3817031af0286b091ac Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 21:34:06 +0000 Subject: [PATCH 13/56] docs/Makefile.am, docs/man/Makefile.am: touch .prep-src-docs if called for in-tree builds too Signed-off-by: Jim Klimov --- docs/Makefile.am | 4 +++- docs/man/Makefile.am | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 34025547fc..80fd7f0476 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -613,7 +613,9 @@ endif !HAVE_ASPELL # under the same dir structure (tool limitation) PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) .prep-src-docs: $(PREP_SRC) - @if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ + if ! test -e "$@" ; then touch "$@" ; fi ; \ + else \ COUNT=30 ; \ touch "$@.$$$$" ; \ while test -e "$@.working" -a "$$COUNT" -gt 0 ; do sleep 1; COUNT="`expr $$COUNT - 1`"; done ; \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index ce72931ef1..4948fffd09 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1154,7 +1154,9 @@ spellcheck spellcheck-interactive spellcheck-sortdict: # stack (causing a dependency loop)! PREP_SRC = $(SRC_ALL_PAGES) asciidoc.conf .prep-src-docs: $(PREP_SRC) - @if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ + if ! test -e "$@" ; then touch "$@" ; fi ; \ + else \ COUNT=30 ; \ touch "$@.$$$$" ; \ while test -e "$@.working" -a "$$COUNT" -gt 0 ; do sleep 1; COUNT="`expr $$COUNT - 1`"; done ; \ From 35932b6423ea96389a899befe10cf1e416bb6c16 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 19 Feb 2024 21:34:40 +0000 Subject: [PATCH 14/56] docs/man/Makefile.am: fix out-of-tree build check for linkman-driver{,tool}-names.txt recipes Signed-off-by: Jim Klimov --- docs/man/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 4948fffd09..ad0fb4e91b 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -837,7 +837,7 @@ LINKMAN_INCLUDE_GENERATED = linkman-driver-names.txt linkman-drivertool-names.tx LINKMAN_INCLUDE_CONSUMERS = index.txt upsd.txt nutupsdrv.txt linkman-driver-names.txt: - @if test x"$(srcdir)" != x"$(builddir)" ; then \ + @if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ if ! test -s "$(builddir)/$@" && test -s "$(srcdir)/$(@F)" ; then \ ln -fs "$(srcdir)/$(@F)" "$(builddir)/" ; \ fi ; \ @@ -852,7 +852,7 @@ linkman-driver-names.txt: @if test ! -s "$@" ; then echo "- No NUT drivers were built" > "$@" ; fi linkman-drivertool-names.txt: - @if test x"$(srcdir)" != x"$(builddir)" ; then \ + @if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ if ! test -s "$(builddir)/$@" && test -s "$(srcdir)/$(@F)" ; then \ ln -fs "$(srcdir)/$(@F)" "$(builddir)/" ; \ fi ; \ From b614c5888763beeeb023555c202c5bd94b743204 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 00:11:17 +0000 Subject: [PATCH 15/56] docs/man/Makefile.am, docs/Makefile.am: make sure that "all" target is first Signed-off-by: Jim Klimov --- docs/Makefile.am | 4 ++-- docs/man/Makefile.am | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 80fd7f0476..f27261ea66 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -3,6 +3,8 @@ MAINTAINERCLEANFILES = Makefile.in .dirstamp EXTRA_DIST = +all: doc + # Is "egrep == grep -E" always valid? (maybe all a job for configure.ac) #EGREP = egrep EGREP = grep -E @@ -121,8 +123,6 @@ ASCIIDOC_PDF = user-manual.pdf \ SUBDIRS = man cables SUFFIXES = .txt .html .pdf -spellchecked -all: doc - # This list is defined by configure script choices and options: CHECK_LOCAL_TARGETS = @DOC_CHECK_LIST@ if WITH_SPELLCHECK diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index ad0fb4e91b..2da55212c5 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -20,6 +20,8 @@ #EGREP = egrep EGREP = grep -E +all: + # Base configuration and client manpages, always installed SRC_CONF_PAGES = \ nut.conf.txt \ @@ -873,7 +875,6 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. # git, and not part of tarball (to be in builddir) - so not in EXTRA_DIST. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) -all: # Sub-make to fully process prep first, and only then go to actual make # (maybe parallel) with unambiguously defined sources and targets From 7049ac1d6b32ed1b7b7d82dfd9286afdd57e804e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 00:13:00 +0000 Subject: [PATCH 16/56] docs/man/Makefile.am, docs/Makefile.am: rearrange dependencies on .prep-src-docs, avoid sub-makes where we can Signed-off-by: Jim Klimov --- docs/Makefile.am | 25 ++++++++----------------- docs/man/Makefile.am | 9 +++------ 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index f27261ea66..5b43134c1e 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -130,33 +130,24 @@ CHECK_LOCAL_TARGETS += spellcheck endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) +# Make sure sources are there for out-of-tree builds +@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): .prep-src-docs + # This list is defined by configure script choices and options: -doc: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) @DOC_BUILD_LIST@ +doc: @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): -docs: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) pdf html-single html-chunked man-man html-man +docs: pdf html-single html-chunked man-man html-man all-docs: docs check-docs: check-pdf check-html-single check-html-chunked check-man -pdf: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_PDF) - +pdf: $(ASCIIDOC_PDF) # also build the HTML manpages with these targets -html-single: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_SINGLE) - -html-chunked: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) $(ASCIIDOC_HTML_CHUNKED) +html-single: $(ASCIIDOC_HTML_SINGLE) +html-chunked: $(ASCIIDOC_HTML_CHUNKED) # the "for" loops might better use $^ but it might be not portable check-pdf: $(ASCIIDOC_PDF) diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 2da55212c5..0f552bd6ce 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -875,18 +875,15 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. # git, and not part of tarball (to be in builddir) - so not in EXTRA_DIST. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) +$(HTML_MANS) $(MAN_MANS) index.html: .prep-src-docs # Sub-make to fully process prep first, and only then go to actual make # (maybe parallel) with unambiguously defined sources and targets -all-html html-man: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) $(HTML_MANS) index.html +all-html html-man: $(HTML_MANS) index.html # Have a way to build all man pages, not just those that fit currently # configured drivers, daemons, developer aspect, etc. -all-man man-man: - +if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi - +$(MAKE) $(AM_MAKEFLAGS) $(MAN_MANS) +all-man man-man: $(MAN_MANS) if WITH_MANS if ! SKIP_MANS From 82458d57cb12a1b7a160359226d95827e6498104 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 00:13:15 +0000 Subject: [PATCH 17/56] docs/man/Makefile.am: simplify clean-up Signed-off-by: Jim Klimov --- docs/man/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 0f552bd6ce..8eb91061fe 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -947,7 +947,7 @@ check-man-txt: $(SRC_ALL_PAGES) echo "FAILED man-source sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ fi; echo "PASSED man-source sanity check (checked $$CHECKED files)"; exit 0 -CLEANFILES = *-spellchecked .prep-src-docs +CLEANFILES = *-spellchecked SUFFIXES = .txt .html .1 .3 .5 .8 From 25a718434c7ae9ffa51141efad578f9794cfbc54 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 01:00:13 +0000 Subject: [PATCH 18/56] docs/man/Makefile.am: be sure to include LINKMAN_INCLUDE_GENERATED into PREP_SRC Signed-off-by: Jim Klimov --- docs/man/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 8eb91061fe..1f91e96981 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1150,7 +1150,7 @@ spellcheck spellcheck-interactive spellcheck-sortdict: # NOTE: Not including *all* of EXTRA_DIST here, because we also "dist" # the built man pages in the tarball for end-users without an asciidoc # stack (causing a dependency loop)! -PREP_SRC = $(SRC_ALL_PAGES) asciidoc.conf +PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf .prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ if ! test -e "$@" ; then touch "$@" ; fi ; \ From 30bc2b24c2b810cdbc7416eec709f42a3710436b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 01:02:34 +0000 Subject: [PATCH 19/56] docs/Makefile.am, docs/man/Makefile.am: when cleaning PREP_SRC symlinks, be sure to only hit symlinks Signed-off-by: Jim Klimov --- docs/Makefile.am | 4 +++- docs/man/Makefile.am | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 5b43134c1e..c66cc7245a 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -635,7 +635,9 @@ clean-local: $(AM_V_at)rm -rf *.chunked *.bak tmp $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ for F in $(PREP_SRC) ; do \ - rm -f "$(builddir)/$$F" ; \ + if test -L "$$F" || test -H "$$F" ; then \ + rm -f "$(builddir)/$$F" ; \ + fi ; \ done ; \ rm -f "$(builddir)/.prep-src-docs"*; \ fi diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 1f91e96981..293efc7cde 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1184,7 +1184,9 @@ clean-local: $(AM_V_at)rm -rf tmp $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ for F in $(PREP_SRC) ; do \ - rm -f "$(builddir)/$$F" ; \ + if test -L "$$F" || test -H "$$F" ; then \ + rm -f "$(builddir)/$$F" ; \ + fi ; \ done ; \ rm -f "$(builddir)/.prep-src-docs"*; \ fi From 693ccda2d203d4af87dbfb44243cc182dbb55b97 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 01:09:49 +0000 Subject: [PATCH 20/56] docs/Makefile.am, docs/man/Makefile.am: when creating PREP_SRC symlinks, report current workdir (help with relative src/build dirs) Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index c66cc7245a..f91f22874f 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -621,7 +621,7 @@ PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) D="`dirname "$$F"`" ; \ $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ if ! test -s "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ - echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F'" >&2 ; \ + echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F' (PWD = '`pwd`')" >&2 ; \ ln -fs "$(abs_srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 293efc7cde..cf3f6cf9d7 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1169,7 +1169,7 @@ PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf D="`dirname "$$F"`" ; \ $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ if ! test -e "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ - echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F'" >&2 ; \ + echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F' (PWD = '`pwd`')" >&2 ; \ ln -fs "$(abs_srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ From de46cb4374fe7284e8fd35da2f0ea80a7766b484 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 01:18:29 +0000 Subject: [PATCH 21/56] docs/Makefile.am, docs/man/Makefile.am: play with VPATH to help prefer PREP_SRC symlinks Signed-off-by: Jim Klimov --- docs/Makefile.am | 5 ++++- docs/man/Makefile.am | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index f91f22874f..f182c2afdd 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -130,9 +130,12 @@ CHECK_LOCAL_TARGETS += spellcheck endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) -# Make sure sources are there for out-of-tree builds +# Make sure sources are there for out-of-tree builds: @DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): .prep-src-docs +# Make sure we look for source texts as symlinks in builddir first: +VPATH = $(builddir):$(srcdir) + # This list is defined by configure script choices and options: doc: @DOC_BUILD_LIST@ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index cf3f6cf9d7..c78365a0cc 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -875,8 +875,12 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. # git, and not part of tarball (to be in builddir) - so not in EXTRA_DIST. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) +# Make sure sources are there for out-of-tree builds: $(HTML_MANS) $(MAN_MANS) index.html: .prep-src-docs +# Make sure we look for source texts as symlinks in builddir first: +VPATH = $(builddir):$(srcdir) + # Sub-make to fully process prep first, and only then go to actual make # (maybe parallel) with unambiguously defined sources and targets all-html html-man: $(HTML_MANS) index.html From a0fd292d06c28486d99870a180f15344f8eca65e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 07:54:49 +0000 Subject: [PATCH 22/56] docs/man/Makefile.am: enable the opportunistic suffix rule for build products to depend on .prep-src-docs Hopefully avoids duplicate parallel runs of the helper where the make implementation would support it (courtesy above standard requirements). Signed-off-by: Jim Klimov --- docs/man/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index c78365a0cc..d1b8def6c5 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1017,7 +1017,7 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. -#*.html *.1 *.3 *.5 *.8: .prep-src-docs +*.html *.1 *.3 *.5 *.8: .prep-src-docs ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we From f93eaa2f48fc9a0a10af2ee34b83e73f230a7803 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 10:04:10 +0000 Subject: [PATCH 23/56] Makefile.am: try to be sure to use the job server for docs-related sub-makes ...when using custom make targets to build specific docs or checks Signed-off-by: Jim Klimov --- Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index e00c3eae05..1a8a2d4363 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,12 +164,12 @@ spellcheck spellcheck-interactive: doc spellcheck-sortdict \ all-docs check-docs \ man all-man man-man check-man man-html all-html: - cd $(builddir)/docs/man && $(MAKE) .prep-src-docs - cd $(builddir)/docs && $(MAKE) .prep-src-docs - cd $(builddir)/docs && $(MAKE) $@ + +cd $(builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs + +cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs + +cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) $@ INSTALL.nut UPGRADING NEWS README: - cd $(builddir)/docs && $(MAKE) ../$(@F).adoc-parsed && cp -f ../$(@F).adoc-parsed ../$(@F) + +cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) ../$(@F).adoc-parsed && cp -f ../$(@F).adoc-parsed ../$(@F) # Workarounds for https://github.com/github/markup/issues/1095 # require direct definition of our attributes in each source From 919cc3caea6e8c489fa482e632db756b8637e9f5 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 10:02:49 +0000 Subject: [PATCH 24/56] docs/man/Makefile.am, docs/Makefile.am, Makefile.am: avoid hacky rules to pre-call .prep-src-docs; use hacky touch-files instead Signed-off-by: Jim Klimov --- .gitignore | 1 + Makefile.am | 2 -- docs/Makefile.am | 56 ++++++++++++++++++--------------- docs/man/Makefile.am | 75 ++++++++++++++++++-------------------------- 4 files changed, 62 insertions(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index 26991a7786..bc2e70a1a3 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ Makefile.in /missing /test-driver *-spellchecked +*-prepped *.adoc-parsed *.adoc*.tmp *.txt*.tmp diff --git a/Makefile.am b/Makefile.am index 1a8a2d4363..b0f25ebb20 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,8 +164,6 @@ spellcheck spellcheck-interactive: doc spellcheck-sortdict \ all-docs check-docs \ man all-man man-man check-man man-html all-html: - +cd $(builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs - +cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs +cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) $@ INSTALL.nut UPGRADING NEWS README: diff --git a/docs/Makefile.am b/docs/Makefile.am index f182c2afdd..6b3857123d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -121,7 +121,7 @@ ASCIIDOC_PDF = user-manual.pdf \ FAQ.pdf SUBDIRS = man cables -SUFFIXES = .txt .html .pdf -spellchecked +SUFFIXES = .txt .html .pdf -spellchecked .txt-prepped # This list is defined by configure script choices and options: CHECK_LOCAL_TARGETS = @DOC_CHECK_LIST@ @@ -131,10 +131,7 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # Make sure sources are there for out-of-tree builds: -@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): .prep-src-docs - -# Make sure we look for source texts as symlinks in builddir first: -VPATH = $(builddir):$(srcdir) +#@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): .prep-src-docs # This list is defined by configure script choices and options: doc: @DOC_BUILD_LIST@ @@ -188,10 +185,10 @@ check-html-chunked: $(ASCIIDOC_HTML_CHUNKED) # chosen during configure script execution. The "all-man" and "all-html" # rules build everything documented. check-man all-man man-man all-html html-man: - +cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ + +cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@ man: - +cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile .prep-src-docs && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all + +cd $(top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css docinfo.xml.in.tmp CLEANFILES += $(top_builddir)/INSTALL.nut $(top_builddir)/UPGRADING $(top_builddir)/NEWS $(top_builddir)/ChangeLog.adoc $(top_builddir)/README @@ -327,7 +324,6 @@ 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. DOCBUILD_BEGIN = { \ - if test x"$(abs_srcdir)" != x"$(abs_builddir)" -a ! -e "$(abs_builddir)/.prep-src-docs"; then $(MAKE) $(AM_MAKEFLAGS) .prep-src-docs ; fi ; \ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ rm -rf "./$${A2X_OUTDIR}" || true ; \ test -d "$@" && rm -rf "$@" || true ; \ @@ -357,6 +353,12 @@ DOCBUILD_END = { \ fi ; \ } +### Call the prep step consistently to create symlinks (out-of-tree) +### or just touch-files for peace of mind (in-tree builds). Then we +### use these path names (truncated "-prepped") now surely located +### in the builddir as the sources for rendered docs. +*.txt-prepped: .prep-src-docs + # PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with # prerequisites like done below, and GNU Make of some versions complains; # https://www.gnu.org/software/make/manual/html_node/Error-Messages.html @@ -368,32 +370,29 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. -*.html: common.xsl xhtml.xsl .prep-src-docs -.txt.html: - @+A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ - echo " DOC-HTML Preparing to generate $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ +*.html: common.xsl xhtml.xsl +.txt-prepped.html: + @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ echo " DOC-HTML Generating $@"; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< || RES=$$? ; \ + $(DOCBUILD_BEGIN) ; RES=0; \ + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl "$( Date: Tue, 20 Feb 2024 10:25:13 +0000 Subject: [PATCH 25/56] GitIgnore .prep-src-docs* touch-files Signed-off-by: Jim Klimov --- docs/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/.gitignore b/docs/.gitignore index c4d2f30a87..6d00f93f51 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -25,3 +25,4 @@ nut.dict.sorted /tmp/ docinfo.xml.in.tmp /asciidoc-vars.conf.lastrev.tmp +.prep-src-docs* From fce492212f9f600d35f789cc563fe0226cfe3c23 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 10:28:00 +0000 Subject: [PATCH 26/56] docs/man/Makefile.am, docs/Makefile.am: insist on having a "$(builddir)/.prep-src-docs" ...do not get distracted by one in-tree, if any, when doing out-of-tree builds Signed-off-by: Jim Klimov --- docs/Makefile.am | 6 +++--- docs/man/Makefile.am | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 6b3857123d..6c127f9452 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -131,7 +131,7 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # Make sure sources are there for out-of-tree builds: -#@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): .prep-src-docs +#@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(builddir)/.prep-src-docs # This list is defined by configure script choices and options: doc: @DOC_BUILD_LIST@ @@ -357,7 +357,7 @@ DOCBUILD_END = { \ ### or just touch-files for peace of mind (in-tree builds). Then we ### use these path names (truncated "-prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt-prepped: .prep-src-docs +*.txt-prepped: $(builddir)/.prep-src-docs # PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with # prerequisites like done below, and GNU Make of some versions complains; @@ -605,7 +605,7 @@ endif !HAVE_ASPELL # When building out-of-tree, be sure to have all asciidoc resources # under the same dir structure (tool limitation) PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) -.prep-src-docs: $(PREP_SRC) +$(builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ if ! test -e "$@" ; then touch "$@" ; fi ; \ else \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index a24f67dbba..86f0b336f1 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -876,7 +876,7 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) # Make sure sources are there for out-of-tree builds: -#$(HTML_MANS) $(MAN_MANS) index.html: .prep-src-docs +#$(HTML_MANS) $(MAN_MANS) index.html: $(builddir)/.prep-src-docs all-html html-man: $(HTML_MANS) index.html @@ -1004,7 +1004,7 @@ DOCBUILD_END = { \ ### or just touch-files for peace of mind (in-tree builds). Then we ### use these path names (truncated "-prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt-prepped: .prep-src-docs +*.txt-prepped: $(builddir)/.prep-src-docs ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we @@ -1137,7 +1137,7 @@ spellcheck spellcheck-interactive spellcheck-sortdict: # the built man pages in the tarball for end-users without an asciidoc # stack (causing a dependency loop)! PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf -.prep-src-docs: $(PREP_SRC) +$(builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ if ! test -e "$@" ; then touch "$@" ; fi ; \ else \ From 84cee896a3deef426b98355856f5cd0f0614329f Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 10:31:01 +0000 Subject: [PATCH 27/56] docs/man/Makefile.am, docs/Makefile.am, Makefile.am: use *.txt_prepped (with underscore) for suffix rules Signed-off-by: Jim Klimov --- .gitignore | 2 +- docs/Makefile.am | 24 ++++++++++++------------ docs/man/Makefile.am | 32 ++++++++++++++++---------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index bc2e70a1a3..37d473d3ad 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ Makefile.in /missing /test-driver *-spellchecked -*-prepped +*_prepped *.adoc-parsed *.adoc*.tmp *.txt*.tmp diff --git a/docs/Makefile.am b/docs/Makefile.am index 6c127f9452..369d7d8f29 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -121,7 +121,7 @@ ASCIIDOC_PDF = user-manual.pdf \ FAQ.pdf SUBDIRS = man cables -SUFFIXES = .txt .html .pdf -spellchecked .txt-prepped +SUFFIXES = .txt .html .pdf -spellchecked .txt_prepped # This list is defined by configure script choices and options: CHECK_LOCAL_TARGETS = @DOC_CHECK_LIST@ @@ -355,9 +355,9 @@ DOCBUILD_END = { \ ### Call the prep step consistently to create symlinks (out-of-tree) ### or just touch-files for peace of mind (in-tree builds). Then we -### use these path names (truncated "-prepped") now surely located +### use these path names (truncated "_prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt-prepped: $(builddir)/.prep-src-docs +*.txt_prepped: $(builddir)/.prep-src-docs # PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with # prerequisites like done below, and GNU Make of some versions complains; @@ -371,28 +371,28 @@ DOCBUILD_END = { \ # to trigger builds by a changed dependency), but at least predictable and # not toxic. *.html: common.xsl xhtml.xsl -.txt-prepped.html: +.txt_prepped.html: @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 "$( Date: Tue, 20 Feb 2024 15:58:05 +0000 Subject: [PATCH 28/56] docs/Makefile.am, docs/man/Makefile.am: revise calling the prep vs. document products again Signed-off-by: Jim Klimov --- docs/Makefile.am | 17 +++++++++++++---- docs/man/Makefile.am | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 369d7d8f29..636efac4b7 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -131,10 +131,10 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # Make sure sources are there for out-of-tree builds: -#@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(builddir)/.prep-src-docs +@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(builddir)/.prep-src-docs # This list is defined by configure script choices and options: -doc: @DOC_BUILD_LIST@ +doc: $(builddir)/.prep-src-docs @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): @@ -370,6 +370,8 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. +###.txt.txt_prepped: $(builddir)/.prep-src-docs + *.html: common.xsl xhtml.xsl .txt_prepped.html: @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ @@ -607,6 +609,13 @@ endif !HAVE_ASPELL PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) $(builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ + COUNT=0; \ + for F in `ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + if ! test -e "$${F}_prepped" ; then \ + touch "$${F}_prepped" || exit ; \ + COUNT="`expr $$COUNT + 1`" ; \ + fi ; \ + done ; \ if ! test -e "$@" ; then touch "$@" ; fi ; \ else \ COUNT=30 ; \ @@ -632,8 +641,8 @@ $(builddir)/.prep-src-docs: $(PREP_SRC) COUNT="`expr $$COUNT + 1`" ; \ fi ; \ done ; \ - if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi ; \ - fi + fi ; \ + if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi @rm -f "$@.working" # Dirs to clean, etc. diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 6da8c4b4de..10bb5b0736 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -876,7 +876,7 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) # Make sure sources are there for out-of-tree builds: -#$(HTML_MANS) $(MAN_MANS) index.html: $(builddir)/.prep-src-docs +$(HTML_MANS) $(MAN_MANS) index.html: $(builddir)/.prep-src-docs all-html html-man: $(HTML_MANS) index.html @@ -946,7 +946,7 @@ check-man-txt: $(SRC_ALL_PAGES) echo "FAILED man-source sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ fi; echo "PASSED man-source sanity check (checked $$CHECKED files)"; exit 0 -CLEANFILES = *-spellchecked +CLEANFILES = *-spellchecked .prep-src-docs *_prepped SUFFIXES = .txt_prepped .txt .html .1 .3 .5 .8 @@ -1006,6 +1006,8 @@ DOCBUILD_END = { \ ### in the builddir as the sources for rendered docs. *.txt_prepped: $(builddir)/.prep-src-docs +#.txt.txt_prepped: $(builddir)/.prep-src-docs + ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we ### see the relative builddir as "." in the makefile, for included @@ -1139,7 +1141,13 @@ spellcheck spellcheck-interactive spellcheck-sortdict: PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf $(builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ - if ! test -e "$@" ; then touch "$@" ; fi ; \ + COUNT=0; \ + for F in `ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + if ! test -e "$${F}_prepped" ; then \ + touch "$${F}_prepped" || exit ; \ + COUNT="`expr $$COUNT + 1`" ; \ + fi ; \ + done ; \ else \ COUNT=30 ; \ touch "$@.$$$$" ; \ @@ -1164,8 +1172,8 @@ $(builddir)/.prep-src-docs: $(PREP_SRC) COUNT="`expr $$COUNT + 1`" ; \ fi ; \ done ; \ - if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi ; \ - fi + fi ; \ + if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi @rm -f "$@.working" MAINTAINERCLEANFILES = Makefile.in .dirstamp From 5062ddda535969532122609a6723d556f48a349e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 16:08:10 +0000 Subject: [PATCH 29/56] docs/Makefile.am, docs/man/Makefile.am: .prep-src-docs: for in-tree builds, cover all PREP_SRC names even if they do not yet exist Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 636efac4b7..4a1d88e725 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -610,7 +610,7 @@ PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) $(builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ - for F in `ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + for F in $(PREP_SRC) ; do \ if ! test -e "$${F}_prepped" ; then \ touch "$${F}_prepped" || exit ; \ COUNT="`expr $$COUNT + 1`" ; \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 10bb5b0736..ff1ed48005 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1142,7 +1142,7 @@ PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf $(builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ - for F in `ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + for F in $(PREP_SRC) ; do \ if ! test -e "$${F}_prepped" ; then \ touch "$${F}_prepped" || exit ; \ COUNT="`expr $$COUNT + 1`" ; \ From b1048c77b91a4d1c3b3fb3bec229cf0a28f6d5e8 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 16:12:43 +0000 Subject: [PATCH 30/56] docs/Makefile.am: depend spellcheck on .prep-src-docs too, for completeness Signed-off-by: Jim Klimov --- docs/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 4a1d88e725..ee0d766525 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -472,7 +472,7 @@ ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$) SPELLCHECK_RECIPE_DEBUG_STREAM = /dev/null #SPELLCHECK_RECIPE_DEBUG_STREAM = &2 -$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) +$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .prep-src-docs @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@)" >&2 ; exit 0; fi; \ case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@)" >&2 ; exit 0;; esac; \ @@ -516,7 +516,9 @@ $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/ exit $$RES; } ; \ touch "$@" -spellcheck: +# No physical need to depend on prep, however this brings peace of mind to +# "make" itself that the *.txt source "dependencies" are satisfied. +spellcheck: .prep-src-docs @if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ echo "ASPELL DEBUG : information about the setup follows:"; \ LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ From 2f8671dc8d063727d4cda82e02c48257a5be315b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 20 Feb 2024 19:47:49 +0000 Subject: [PATCH 31/56] docs/Makefile.am, docs/man/Makefile.am: only the paths deal in absolutes! Signed-off-by: Jim Klimov --- docs/Makefile.am | 48 +++++++++++++++++++++++++++++--------------- docs/man/Makefile.am | 42 ++++++++++++++++++++++++++------------ 2 files changed, 61 insertions(+), 29 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index ee0d766525..12c8fc05f2 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -131,10 +131,10 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # Make sure sources are there for out-of-tree builds: -@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(builddir)/.prep-src-docs +@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(abs_builddir)/.prep-src-docs # This list is defined by configure script choices and options: -doc: $(builddir)/.prep-src-docs @DOC_BUILD_LIST@ +doc: $(abs_builddir)/.prep-src-docs @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): @@ -357,7 +357,7 @@ DOCBUILD_END = { \ ### or just touch-files for peace of mind (in-tree builds). Then we ### use these path names (truncated "_prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt_prepped: $(builddir)/.prep-src-docs +*.txt_prepped: $(abs_builddir)/.prep-src-docs # PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with # prerequisites like done below, and GNU Make of some versions complains; @@ -370,7 +370,7 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. -###.txt.txt_prepped: $(builddir)/.prep-src-docs +###.txt.txt_prepped: $(abs_builddir)/.prep-src-docs *.html: common.xsl xhtml.xsl .txt_prepped.html: @@ -472,7 +472,7 @@ ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$) SPELLCHECK_RECIPE_DEBUG_STREAM = /dev/null #SPELLCHECK_RECIPE_DEBUG_STREAM = &2 -$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .prep-src-docs +$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) $(abs_builddir)/.prep-src-docs @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@)" >&2 ; exit 0; fi; \ case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@)" >&2 ; exit 0;; esac; \ @@ -518,7 +518,7 @@ $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/ # No physical need to depend on prep, however this brings peace of mind to # "make" itself that the *.txt source "dependencies" are satisfied. -spellcheck: .prep-src-docs +spellcheck: $(abs_builddir)/.prep-src-docs @if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ echo "ASPELL DEBUG : information about the setup follows:"; \ LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ @@ -609,10 +609,19 @@ endif !HAVE_ASPELL # When building out-of-tree, be sure to have all asciidoc resources # under the same dir structure (tool limitation) PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) -$(builddir)/.prep-src-docs: $(PREP_SRC) + +# NOTE: Some "make" implementations prefix a relative or absent path to +# the filenames in PREP_SRC, others (e.g. Sun make) prepend the absolute +# path to locate the sources, so we end up with bogus trees under docs/. +# Code below tries to detect and truncate this mess, including possible +# source texts located in/under parent dirs. +$(abs_builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ + case "$$F" in \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ + esac ; \ if ! test -e "$${F}_prepped" ; then \ touch "$${F}_prepped" || exit ; \ COUNT="`expr $$COUNT + 1`" ; \ @@ -630,16 +639,20 @@ $(builddir)/.prep-src-docs: $(PREP_SRC) fi ; \ rm -f "$@.$$$$" ; \ COUNT=0; \ + linkroot="$(abs_builddir)" ; \ for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + case "$$F" in \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)"; linkroot="$(abs_top_builddir)" ;; \ + esac ; \ D="`dirname "$$F"`" ; \ - $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ - if ! test -s "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ - echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F' (PWD = '`pwd`')" >&2 ; \ - ln -fs "$(abs_srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -s "$${linkroot}/$$F" && test -s "$(srcdir)/$$F" ; then \ + echo " LN '$(srcdir)/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" >&2 ; \ + ln -fs "$(abs_srcdir)/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ - if ! test -e "$(builddir)/$${F}_prepped" ; then \ - touch "$(builddir)/$${F}_prepped" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -e "$${linkroot}/$${F}_prepped" ; then \ + touch "$${linkroot}/$${F}_prepped" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ done ; \ @@ -652,12 +665,15 @@ clean-local: $(AM_V_at)rm -rf *.chunked *.bak tmp $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ for F in $(PREP_SRC) ; do \ + case "$$F" in \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ + esac ; \ if test -L "$$F" || test -H "$$F" ; then \ - rm -f "$(builddir)/$$F" ; \ + rm -f "$$F" ; \ fi ; \ - rm -f "$(builddir)/$${F}_prepped" ; \ + rm -f "$${F}_prepped" ; \ done ; \ - rm -f "$(builddir)/.prep-src-docs"*; \ + rm -f "$(abs_builddir)/.prep-src-docs"*; \ fi .PHONY: html html-chunked html-single pdf man diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index ff1ed48005..6df657aeb1 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -876,7 +876,7 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) # Make sure sources are there for out-of-tree builds: -$(HTML_MANS) $(MAN_MANS) index.html: $(builddir)/.prep-src-docs +$(HTML_MANS) $(MAN_MANS) index.html: $(abs_builddir)/.prep-src-docs all-html html-man: $(HTML_MANS) index.html @@ -1004,9 +1004,9 @@ DOCBUILD_END = { \ ### or just touch-files for peace of mind (in-tree builds). Then we ### use these path names (truncated "_prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt_prepped: $(builddir)/.prep-src-docs +*.txt_prepped: $(abs_builddir)/.prep-src-docs -#.txt.txt_prepped: $(builddir)/.prep-src-docs +#.txt.txt_prepped: $(abs_builddir)/.prep-src-docs ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we @@ -1139,10 +1139,19 @@ spellcheck spellcheck-interactive spellcheck-sortdict: # the built man pages in the tarball for end-users without an asciidoc # stack (causing a dependency loop)! PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf -$(builddir)/.prep-src-docs: $(PREP_SRC) + +# NOTE: Some "make" implementations prefix a relative or absent path to +# the filenames in PREP_SRC, others (e.g. Sun make) prepend the absolute +# path to locate the sources, so we end up with bogus trees under docs/. +# Code below tries to detect and truncate this mess, including possible +# source texts located in/under parent dirs. +$(abs_builddir)/.prep-src-docs: $(PREP_SRC) @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ + case "$$F" in \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ + esac ; \ if ! test -e "$${F}_prepped" ; then \ touch "$${F}_prepped" || exit ; \ COUNT="`expr $$COUNT + 1`" ; \ @@ -1159,16 +1168,20 @@ $(builddir)/.prep-src-docs: $(PREP_SRC) fi ; \ rm -f "$@.$$$$" ; \ COUNT=0; \ + linkroot="$(abs_builddir)" ; \ for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + case "$$F" in \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)"; linkroot="$(abs_top_builddir)" ;; \ + esac ; \ D="`dirname "$$F"`" ; \ - $(MKDIR_P) "$(builddir)/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ - if ! test -e "$(builddir)/$$F" && test -s "$(srcdir)/$$F" ; then \ - echo " LN '$(srcdir)/$$F' => '$(builddir)/$$F' (PWD = '`pwd`')" >&2 ; \ - ln -fs "$(abs_srcdir)/$$F" "$(builddir)/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -e "$${linkroot}/$$F" && test -s "$(srcdir)/$$F" ; then \ + echo " LN '$(srcdir)/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" >&2 ; \ + ln -fs "$(abs_srcdir)/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ - if ! test -e "$(builddir)/$${F}_prepped" ; then \ - touch "$(builddir)/$${F}_prepped" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -e "$${linkroot}/$${F}_prepped" ; then \ + touch "$${linkroot}/$${F}_prepped" || { rm -f "$@.working" ; exit 1 ; } ; \ COUNT="`expr $$COUNT + 1`" ; \ fi ; \ done ; \ @@ -1182,10 +1195,13 @@ clean-local: $(AM_V_at)rm -rf tmp $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ for F in $(PREP_SRC) ; do \ + case "$$F" in \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ + esac ; \ if test -L "$$F" || test -H "$$F" ; then \ - rm -f "$(builddir)/$$F" ; \ + rm -f "$$F" ; \ fi ; \ - rm -f "$(builddir)/$${F}_prepped" ; \ + rm -f "$${F}_prepped" ; \ done ; \ - rm -f "$(builddir)/.prep-src-docs"*; \ + rm -f "$(abs_builddir)/.prep-src-docs"*; \ fi From c3fb3ff216f35821e8b5eea14a5af88c2501bdb0 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 08:24:06 +0000 Subject: [PATCH 32/56] docs/Makefile.am, docs/man/Makefile.am: try to accomodate different "make" implementations for .prep-src-docs file discovery Signed-off-by: Jim Klimov --- docs/Makefile.am | 25 ++++++++++++++++++------- docs/man/Makefile.am | 25 ++++++++++++++++++------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 12c8fc05f2..2b8513b153 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -616,11 +616,17 @@ PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) # Code below tries to detect and truncate this mess, including possible # source texts located in/under parent dirs. $(abs_builddir)/.prep-src-docs: $(PREP_SRC) - @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ + @set -x ; \ + linkroot="$(abs_builddir)" ; \ + if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ case "$$F" in \ - /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ + if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ + linkroot="$(abs_top_builddir)" ; \ + cd "$(abs_top_builddir)" ; \ + fi ;; \ esac ; \ if ! test -e "$${F}_prepped" ; then \ touch "$${F}_prepped" || exit ; \ @@ -639,16 +645,21 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) fi ; \ rm -f "$@.$$$$" ; \ COUNT=0; \ - linkroot="$(abs_builddir)" ; \ + linksrcroot="$(abs_srcdir)" ; \ for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ case "$$F" in \ - /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)"; linkroot="$(abs_top_builddir)" ;; \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ + if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ + linkroot="$(abs_top_builddir)" ; \ + linksrcroot="$(abs_top_srcdir)" ; \ + cd "$(abs_top_builddir)" ; \ + fi ;; \ esac ; \ D="`dirname "$$F"`" ; \ $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ - if ! test -s "$${linkroot}/$$F" && test -s "$(srcdir)/$$F" ; then \ - echo " LN '$(srcdir)/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" >&2 ; \ - ln -fs "$(abs_srcdir)/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \ + if ! test -s "$${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 \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 6df657aeb1..acac3eb815 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1146,11 +1146,17 @@ PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf # Code below tries to detect and truncate this mess, including possible # source texts located in/under parent dirs. $(abs_builddir)/.prep-src-docs: $(PREP_SRC) - @if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ + @set -x ; \ + linkroot="$(abs_builddir)" ; \ + if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ case "$$F" in \ - /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ + if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ + linkroot="$(abs_top_builddir)" ; \ + cd "$(abs_top_builddir)" ; \ + fi ;; \ esac ; \ if ! test -e "$${F}_prepped" ; then \ touch "$${F}_prepped" || exit ; \ @@ -1168,16 +1174,21 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) fi ; \ rm -f "$@.$$$$" ; \ COUNT=0; \ - linkroot="$(abs_builddir)" ; \ + linksrcroot="$(abs_srcdir)" ; \ for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ case "$$F" in \ - /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)"; linkroot="$(abs_top_builddir)" ;; \ + /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ + if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ + linkroot="$(abs_top_builddir)" ; \ + linksrcroot="$(abs_top_srcdir)" ; \ + cd "$(abs_top_builddir)" ; \ + fi ;; \ esac ; \ D="`dirname "$$F"`" ; \ $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ - if ! test -e "$${linkroot}/$$F" && test -s "$(srcdir)/$$F" ; then \ - echo " LN '$(srcdir)/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" >&2 ; \ - ln -fs "$(abs_srcdir)/$$F" "$${linkroot}/$$F" || { 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 \ From be09dbcbae31b355e46c3f2e87da077a3ef03453 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 11:02:10 +0000 Subject: [PATCH 33/56] docs/Makefile.am, docs/man/Makefile.am: list PREP_SRC pathnames starting from builddir as "make" crafts them, not from srcdir Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 2b8513b153..4c2ba8012d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -646,7 +646,7 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) rm -f "$@.$$$$" ; \ COUNT=0; \ linksrcroot="$(abs_srcdir)" ; \ - for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + for F in `cd "$(abs_builddir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ case "$$F" in \ /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index acac3eb815..e652dfe86f 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1175,7 +1175,7 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) rm -f "$@.$$$$" ; \ COUNT=0; \ linksrcroot="$(abs_srcdir)" ; \ - for F in `cd "$(abs_srcdir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + for F in `cd "$(abs_builddir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ case "$$F" in \ /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ From 69e6a21f3c654224bea9d5de1ac0769c3a599ccb Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 11:05:20 +0000 Subject: [PATCH 34/56] docs/Makefile.am, docs/man/Makefile.am: chop non-trivial "srcdir" from PREP_SRC pathnames, if present Signed-off-by: Jim Klimov --- docs/Makefile.am | 1 + docs/man/Makefile.am | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index 4c2ba8012d..f6d18b33d3 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -654,6 +654,7 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) linksrcroot="$(abs_top_srcdir)" ; \ cd "$(abs_top_builddir)" ; \ fi ;; \ + "$(srcdir)"/*) F="`echo "$$F" | sed 's#^$(srcdir)/*#./#'`" ;; \ esac ; \ D="`dirname "$$F"`" ; \ $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index e652dfe86f..a892e7a8bc 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1183,6 +1183,7 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) linksrcroot="$(abs_top_srcdir)" ; \ cd "$(abs_top_builddir)" ; \ fi ;; \ + "$(srcdir)"/*) F="`echo "$$F" | sed 's#^$(srcdir)/*#./#'`" ;; \ esac ; \ D="`dirname "$$F"`" ; \ $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \ From 0a1a3478781883f1ba80cea858c6407966289a83 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 11:08:17 +0000 Subject: [PATCH 35/56] docs/Makefile.am, docs/man/Makefile.am: drop shell debug tracing from .prep-src-docs rules Signed-off-by: Jim Klimov --- docs/Makefile.am | 3 +-- docs/man/Makefile.am | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index f6d18b33d3..39c4286699 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -616,8 +616,7 @@ PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) # Code below tries to detect and truncate this mess, including possible # source texts located in/under parent dirs. $(abs_builddir)/.prep-src-docs: $(PREP_SRC) - @set -x ; \ - linkroot="$(abs_builddir)" ; \ + @linkroot="$(abs_builddir)" ; \ if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index a892e7a8bc..b3ee6de4b8 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1146,8 +1146,7 @@ PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf # Code below tries to detect and truncate this mess, including possible # source texts located in/under parent dirs. $(abs_builddir)/.prep-src-docs: $(PREP_SRC) - @set -x ; \ - linkroot="$(abs_builddir)" ; \ + @linkroot="$(abs_builddir)" ; \ if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ From 31774451017a401b000d9e6fa949eea479536ae9 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 14:24:32 +0000 Subject: [PATCH 36/56] docs/Makefile.am, docs/man/Makefile.am: do not "ls" files for PREP_SRC, suffices to sort|uniq the names in a diferent manner Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 39c4286699..51aa4e1c7f 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -645,7 +645,7 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) rm -f "$@.$$$$" ; \ COUNT=0; \ linksrcroot="$(abs_srcdir)" ; \ - for F in `cd "$(abs_builddir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + for F in `echo $(PREP_SRC) | tr ' ' '\n' | sort -n | uniq` ; do \ case "$$F" in \ /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index b3ee6de4b8..97f6f5fb85 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1174,7 +1174,7 @@ $(abs_builddir)/.prep-src-docs: $(PREP_SRC) rm -f "$@.$$$$" ; \ COUNT=0; \ linksrcroot="$(abs_srcdir)" ; \ - for F in `cd "$(abs_builddir)" && ls -1 $(PREP_SRC) | sort -n | uniq` ; do \ + for F in `echo $(PREP_SRC) | tr ' ' '\n' | sort -n | uniq` ; do \ case "$$F" in \ /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \ if test x"$${linkroot}" = x"$(abs_builddir)" ; then \ From 60919e30ff7c2d6642ee850b21224c2b8fd7654a Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 15:10:00 +0000 Subject: [PATCH 37/56] docs/nut.dict: learn about "wildcard" (singular) Signed-off-by: Jim Klimov --- docs/nut.dict | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/nut.dict b/docs/nut.dict index 00c37ba187..6f76339144 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3456 utf-8 +personal_ws-1.1 en 3457 utf-8 AAC AAS ABI @@ -3384,6 +3384,7 @@ wf wget whitespace wiki +wildcard wildcards wininit winnutclient From 3ae402c7f4b2ad3321a5f37aca8705d3ab56a477 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 15:15:57 +0000 Subject: [PATCH 38/56] docs/Makefile.am, docs/man/Makefile.am: use full path relative to abs_top_builddir for .prep-src-docs Facilitate running the docs/Makefile from other dirs (to spell-check their docs) Signed-off-by: Jim Klimov --- docs/Makefile.am | 19 ++++++++++--------- docs/man/Makefile.am | 13 +++++++------ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 51aa4e1c7f..d995dcd5e2 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -131,10 +131,10 @@ endif WITH_SPELLCHECK check-local: $(CHECK_LOCAL_TARGETS) # Make sure sources are there for out-of-tree builds: -@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(abs_builddir)/.prep-src-docs +@DOC_BUILD_LIST@ $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(abs_top_builddir)/docs/.prep-src-docs # This list is defined by configure script choices and options: -doc: $(abs_builddir)/.prep-src-docs @DOC_BUILD_LIST@ +doc: $(abs_top_builddir)/docs/.prep-src-docs @DOC_BUILD_LIST@ # This target can be called by developers to go around the configure # script choices at their risk (e.g. missing tools are possible): @@ -357,7 +357,7 @@ DOCBUILD_END = { \ ### or just touch-files for peace of mind (in-tree builds). Then we ### use these path names (truncated "_prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt_prepped: $(abs_builddir)/.prep-src-docs +*.txt_prepped: $(abs_top_builddir)/docs/.prep-src-docs # PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with # prerequisites like done below, and GNU Make of some versions complains; @@ -370,7 +370,7 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. -###.txt.txt_prepped: $(abs_builddir)/.prep-src-docs +###.txt.txt_prepped: $(abs_top_builddir)/docs/.prep-src-docs *.html: common.xsl xhtml.xsl .txt_prepped.html: @@ -472,7 +472,7 @@ ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$) SPELLCHECK_RECIPE_DEBUG_STREAM = /dev/null #SPELLCHECK_RECIPE_DEBUG_STREAM = &2 -$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) $(abs_builddir)/.prep-src-docs +$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) $(abs_top_builddir)/docs/.prep-src-docs @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@)" >&2 ; exit 0; fi; \ case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@)" >&2 ; exit 0;; esac; \ @@ -518,7 +518,7 @@ $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/ # No physical need to depend on prep, however this brings peace of mind to # "make" itself that the *.txt source "dependencies" are satisfied. -spellcheck: $(abs_builddir)/.prep-src-docs +spellcheck: $(abs_top_builddir)/docs/.prep-src-docs @if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ echo "ASPELL DEBUG : information about the setup follows:"; \ LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ @@ -615,8 +615,9 @@ PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT) # path to locate the sources, so we end up with bogus trees under docs/. # Code below tries to detect and truncate this mess, including possible # source texts located in/under parent dirs. -$(abs_builddir)/.prep-src-docs: $(PREP_SRC) - @linkroot="$(abs_builddir)" ; \ +$(abs_top_builddir)/docs/.prep-src-docs: $(PREP_SRC) + @cd "$(@D)" || exit ; \ + linkroot="$(abs_builddir)" ; \ if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ @@ -684,7 +685,7 @@ clean-local: fi ; \ rm -f "$${F}_prepped" ; \ done ; \ - rm -f "$(abs_builddir)/.prep-src-docs"*; \ + rm -f "$(abs_top_builddir)/docs/.prep-src-docs"*; \ fi .PHONY: html html-chunked html-single pdf man diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 97f6f5fb85..701e2939cb 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -876,7 +876,7 @@ $(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names. DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) # Make sure sources are there for out-of-tree builds: -$(HTML_MANS) $(MAN_MANS) index.html: $(abs_builddir)/.prep-src-docs +$(HTML_MANS) $(MAN_MANS) index.html: $(abs_top_builddir)/docs/man/.prep-src-docs all-html html-man: $(HTML_MANS) index.html @@ -1004,9 +1004,9 @@ DOCBUILD_END = { \ ### or just touch-files for peace of mind (in-tree builds). Then we ### use these path names (truncated "_prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt_prepped: $(abs_builddir)/.prep-src-docs +*.txt_prepped: $(abs_top_builddir)/docs/man/.prep-src-docs -#.txt.txt_prepped: $(abs_builddir)/.prep-src-docs +#.txt.txt_prepped: $(abs_top_builddir)/docs/man/.prep-src-docs ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we @@ -1145,8 +1145,9 @@ PREP_SRC = $(LINKMAN_INCLUDE_GENERATED) $(SRC_ALL_PAGES) asciidoc.conf # path to locate the sources, so we end up with bogus trees under docs/. # Code below tries to detect and truncate this mess, including possible # source texts located in/under parent dirs. -$(abs_builddir)/.prep-src-docs: $(PREP_SRC) - @linkroot="$(abs_builddir)" ; \ +$(abs_top_builddir)/docs/man/.prep-src-docs: $(PREP_SRC) + @cd "$(@D)" || exit ; \ + linkroot="$(abs_builddir)" ; \ if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \ COUNT=0; \ for F in $(PREP_SRC) ; do \ @@ -1214,5 +1215,5 @@ clean-local: fi ; \ rm -f "$${F}_prepped" ; \ done ; \ - rm -f "$(abs_builddir)/.prep-src-docs"*; \ + rm -f "$(abs_top_builddir)/docs/man/.prep-src-docs"*; \ fi From 21349ad90fa9fa426dd67f782706e487aa7c3a7b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 15:34:57 +0000 Subject: [PATCH 39/56] docs/Makefile.am: do not hard-code running dpkg (for diags) everywhere Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index d995dcd5e2..5086915e79 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -523,7 +523,7 @@ spellcheck: $(abs_top_builddir)/docs/.prep-src-docs echo "ASPELL DEBUG : information about the setup follows:"; \ LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ $(ASPELL) --help || true; \ - dpkg -l |grep -i aspell || true ; \ + (command -v dpkg) && ( dpkg -l | grep -i aspell ) || true ; \ echo "ASPELL automatic execution line is : ( sed 's,^\(.*\)$$, \1,' < docfile.txt | $(ASPELL) -a $(ASPELL_NUT_TEXMODE_ARGS) $(ASPELL_NUT_COMMON_ARGS) | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' )" ; \ echo "ASPELL proceeding to spellchecking job..."; \ else true; fi From b7e54012da640c51b1d3a1a1179a9857b73a9017 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 15:45:25 +0000 Subject: [PATCH 40/56] docs/Makefile.am: spellcheck recipes: report "pwd" when complaining about bogus paths Signed-off-by: Jim Klimov --- docs/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 5086915e79..2022a7dcbe 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -474,8 +474,8 @@ SPELLCHECK_RECIPE_DEBUG_STREAM = /dev/null $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) $(abs_top_builddir)/docs/.prep-src-docs @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@)" >&2 ; exit 0; fi; \ - case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@)" >&2 ; exit 0;; esac; \ + if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@ from `pwd`)" >&2 ; exit 0; fi; \ + case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@ from `pwd`)" >&2 ; exit 0;; esac; \ rm -f "$@" || true ; \ REPORT_SRCDIR="$(SPELLCHECK_SRCDIR)"; \ REPORT_SRC_ONE="$(SPELLCHECK_SRC_ONE)"; \ From 31bccf7f7f8384bc1df406c6be1773b6c94e8409 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 15:46:30 +0000 Subject: [PATCH 41/56] docs/Makefile.am: spellcheck recipes: pass an explicitly empty SPELLCHECK_SRC list to sub-makes (do not confuse .prep-src-docs dependency) Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 2022a7dcbe..33729f6afa 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -532,7 +532,7 @@ spellcheck: $(abs_top_builddir)/docs/.prep-src-docs if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ echo "ASPELL MAKEFILE DEBUG: Will see from `pwd` if '$(SPELLCHECK_SRCDIR)/$${docsrc}-spellchecked' is up to date" >&2; \ else true ; fi ; \ - $(MAKE) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_BUILDDIR="$(SPELLCHECK_BUILDDIR)" SPELLCHECK_SRCDIR="$(SPELLCHECK_SRCDIR)" "$(SPELLCHECK_BUILDDIR)/$${docsrc}-spellchecked" \ + $(MAKE) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC="" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_BUILDDIR="$(SPELLCHECK_BUILDDIR)" SPELLCHECK_SRCDIR="$(SPELLCHECK_SRCDIR)" "$(SPELLCHECK_BUILDDIR)/$${docsrc}-spellchecked" \ || FAILED="$$FAILED $(SPELLCHECK_SRCDIR)/$$docsrc"; \ done ; \ if test -n "$$FAILED" ; then \ From fd9f7d256e72ac88aacf3fff0330a172c398899a Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 21 Feb 2024 20:24:22 +0000 Subject: [PATCH 42/56] docs/Makefile.am: abolish dependency from spellcheck on .prep-src-docs Signed-off-by: Jim Klimov --- docs/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 33729f6afa..db37c27886 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -472,7 +472,7 @@ ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$) SPELLCHECK_RECIPE_DEBUG_STREAM = /dev/null #SPELLCHECK_RECIPE_DEBUG_STREAM = &2 -$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) $(abs_top_builddir)/docs/.prep-src-docs +$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@ from `pwd`)" >&2 ; exit 0; fi; \ case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@ from `pwd`)" >&2 ; exit 0;; esac; \ @@ -516,9 +516,7 @@ $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/ exit $$RES; } ; \ touch "$@" -# No physical need to depend on prep, however this brings peace of mind to -# "make" itself that the *.txt source "dependencies" are satisfied. -spellcheck: $(abs_top_builddir)/docs/.prep-src-docs +spellcheck: @if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ echo "ASPELL DEBUG : information about the setup follows:"; \ LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ From 77d040bf03cd56a95d4fd9ed02b4885dcba286c3 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 07:55:42 +0000 Subject: [PATCH 43/56] docs/Makefile.am: when touching a *-spellchecked file, ensure its dir exists This file may be the only (or first) build product, so nobody else made that dir for us! Signed-off-by: Jim Klimov --- docs/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index db37c27886..6a0e90b448 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -477,6 +477,7 @@ $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/ if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@ from `pwd`)" >&2 ; exit 0; fi; \ case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@ from `pwd`)" >&2 ; exit 0;; esac; \ rm -f "$@" || true ; \ + $(MKDIR_P) "$(@D)" || exit ; \ REPORT_SRCDIR="$(SPELLCHECK_SRCDIR)"; \ REPORT_SRC_ONE="$(SPELLCHECK_SRC_ONE)"; \ REPORT_PREFIX="" ; \ From 56bc09ab1fe75988a731721e88123aac42cb9446 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 08:15:09 +0000 Subject: [PATCH 44/56] scripts/python/module/README.adoc: fix spelling error Signed-off-by: Jim Klimov --- docs/nut.dict | 2 +- scripts/python/module/README.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/nut.dict b/docs/nut.dict index 6f76339144..64deb36f8a 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -823,8 +823,8 @@ NOTOFF NQA NTP NUT's -NUTClient NUTCONF +NUTClient NUTSRC NUTServer NVA diff --git a/scripts/python/module/README.adoc b/scripts/python/module/README.adoc index 8397806dce..18b1d84ddd 100644 --- a/scripts/python/module/README.adoc +++ b/scripts/python/module/README.adoc @@ -126,7 +126,7 @@ ver ~~~ Sends the `VER` command to the NUT data server and returns its self-reported -identification such as version, product or distribution it may be bundied with. +identification such as version, product or distribution it may be bundled with. Note that the NUT client interactions should not rely on reported versions, but follow the protocol as defined. From 914e57fcf3d5f5dfcadb474ac1d5b7f021dc88ce Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 09:14:08 +0000 Subject: [PATCH 45/56] docs/Makefile.am, docs/man/Makefile.am: fix clean-up of *_prepped files Signed-off-by: Jim Klimov --- docs/Makefile.am | 12 ++++++------ docs/man/Makefile.am | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 6a0e90b448..c23fc03be8 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -674,17 +674,17 @@ $(abs_top_builddir)/docs/.prep-src-docs: $(PREP_SRC) # Dirs to clean, etc. clean-local: $(AM_V_at)rm -rf *.chunked *.bak tmp - $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ - for F in $(PREP_SRC) ; do \ + $(AM_V_at)for F in $(PREP_SRC) ; do \ case "$$F" in \ /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ esac ; \ - if test -L "$$F" || test -H "$$F" ; then \ - rm -f "$$F" ; \ + if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + if test -L "$$F" || test -h "$$F" ; then \ + rm -f "$$F" ; \ + fi ; \ fi ; \ rm -f "$${F}_prepped" ; \ done ; \ - rm -f "$(abs_top_builddir)/docs/.prep-src-docs"*; \ - fi + rm -f "$(abs_top_builddir)/docs/.prep-src-docs"* .PHONY: html html-chunked html-single pdf man diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 701e2939cb..bf91095b6b 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1205,15 +1205,15 @@ MAINTAINERCLEANFILES = Makefile.in .dirstamp clean-local: $(AM_V_at)rm -rf tmp - $(AM_V_at)if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ - for F in $(PREP_SRC) ; do \ + $(AM_V_at)for F in $(PREP_SRC) ; do \ case "$$F" in \ /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \ esac ; \ - if test -L "$$F" || test -H "$$F" ; then \ - rm -f "$$F" ; \ + if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \ + if test -L "$$F" || test -h "$$F" ; then \ + rm -f "$$F" ; \ + fi ; \ fi ; \ rm -f "$${F}_prepped" ; \ done ; \ - rm -f "$(abs_top_builddir)/docs/man/.prep-src-docs"*; \ - fi + rm -f "$(abs_top_builddir)/docs/man/.prep-src-docs"* From 344117f25a57cbdf4717f11a2247790f86a2e2b8 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 09:15:44 +0000 Subject: [PATCH 46/56] docs/Makefile.am, docs/man/Makefile.am, .gitignore: fix back the "-prepped" suffix (with a dash) Signed-off-by: Jim Klimov --- .gitignore | 2 +- docs/Makefile.am | 30 +++++++++++++++--------------- docs/man/Makefile.am | 40 ++++++++++++++++++++-------------------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 37d473d3ad..bc2e70a1a3 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ Makefile.in /missing /test-driver *-spellchecked -*_prepped +*-prepped *.adoc-parsed *.adoc*.tmp *.txt*.tmp diff --git a/docs/Makefile.am b/docs/Makefile.am index c23fc03be8..4eb2f73071 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -121,7 +121,7 @@ ASCIIDOC_PDF = user-manual.pdf \ FAQ.pdf SUBDIRS = man cables -SUFFIXES = .txt .html .pdf -spellchecked .txt_prepped +SUFFIXES = .txt .html .pdf -spellchecked .txt-prepped # This list is defined by configure script choices and options: CHECK_LOCAL_TARGETS = @DOC_CHECK_LIST@ @@ -355,9 +355,9 @@ DOCBUILD_END = { \ ### Call the prep step consistently to create symlinks (out-of-tree) ### or just touch-files for peace of mind (in-tree builds). Then we -### use these path names (truncated "_prepped") now surely located +### use these path names (truncated "-prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt_prepped: $(abs_top_builddir)/docs/.prep-src-docs +*.txt-prepped: $(abs_top_builddir)/docs/.prep-src-docs # PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with # prerequisites like done below, and GNU Make of some versions complains; @@ -370,31 +370,31 @@ DOCBUILD_END = { \ # as done below may be pointless in the end (with regard to a portable way # to trigger builds by a changed dependency), but at least predictable and # not toxic. -###.txt.txt_prepped: $(abs_top_builddir)/docs/.prep-src-docs +###.txt.txt-prepped: $(abs_top_builddir)/docs/.prep-src-docs *.html: common.xsl xhtml.xsl -.txt_prepped.html: +.txt-prepped.html: @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 "$(&2 ; file $$FAILED >&2 ; exit 1; \ fi; echo "PASSED man-source sanity check (checked $$CHECKED files)"; exit 0 -CLEANFILES = *-spellchecked .prep-src-docs *_prepped +CLEANFILES = *-spellchecked .prep-src-docs *-prepped -SUFFIXES = .txt_prepped .txt .html .1 .3 .5 .8 +SUFFIXES = .txt-prepped .txt .html .1 .3 .5 .8 # For builds with allowed installation of prebuild man pages, check that # they exist in sources (make would pull them automatically as a fallback @@ -1002,11 +1002,11 @@ DOCBUILD_END = { \ ### Call the prep step consistently to create symlinks (out-of-tree) ### or just touch-files for peace of mind (in-tree builds). Then we -### use these path names (truncated "_prepped") now surely located +### use these path names (truncated "-prepped") now surely located ### in the builddir as the sources for rendered docs. -*.txt_prepped: $(abs_top_builddir)/docs/man/.prep-src-docs +*.txt-prepped: $(abs_top_builddir)/docs/man/.prep-src-docs -#.txt.txt_prepped: $(abs_top_builddir)/docs/man/.prep-src-docs +#.txt.txt-prepped: $(abs_top_builddir)/docs/man/.prep-src-docs ### Regarding absolute paths in attributes below: by default asciidoc ### resolves include paths relative to the main document, so while we @@ -1015,7 +1015,7 @@ DOCBUILD_END = { \ ### Note: `(top_)srcdir` and `(top_)builddir` must end with a path ### separator, or be empty -- so in all cases letting the resulting ### string resolve meaningfully in the filesystem during docs build. -.txt_prepped.html: +.txt-prepped.html: @A2X_OUTDIR="tmp/man-html.$(@F).$$$$" ; \ echo " DOC-MAN-HTML Generating $@"; \ $(DOCBUILD_BEGIN) ; RES=0; \ @@ -1027,7 +1027,7 @@ DOCBUILD_END = { \ --attribute builddir="$(abs_builddir)/" \ --attribute top_srcdir="$(abs_top_srcdir)/" \ --attribute top_builddir="$(abs_top_builddir)/" \ - -o "$${A2X_OUTDIR}/$(@F)" "$( Date: Thu, 22 Feb 2024 13:14:28 +0000 Subject: [PATCH 47/56] ci_build.sh: do not claim "Could not query git repo" if it was just clean Signed-off-by: Jim Klimov --- ci_build.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ci_build.sh b/ci_build.sh index 079084402b..83e395e447 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -659,11 +659,18 @@ check_gitignore() { return 0 fi - # One invocation should report to log: - git status $GIT_ARGS -s -- "${FILE_GLOB}" \ - | grep -E -v '^.. \.ci.*\.log.*' \ - | grep -E "${FILE_REGEX}" \ - || echo "WARNING: Could not query git repo while in `pwd`" >&2 + # One invocation should report to log if there was any discrepancy + # to report in the first place (GITOUT may be empty without error): + GITOUT="`git status $GIT_ARGS -s -- "${FILE_GLOB}"`" \ + || { echo "WARNING: Could not query git repo while in `pwd`" >&2 ; GITOUT=""; } + + if [ -n "${GITOUT-}" ] ; then + echo "$GITOUT" \ + | grep -E -v '^.. \.ci.*\.log.*' \ + | grep -E "${FILE_REGEX}" + else + echo "Got no output and no errors querying git repo while in `pwd`: seems clean" >&2 + fi echo "===" # Another invocation checks that there was nothing to complain about: From 83b752611584b7515ec7fb3a0a8b8e7ddbf3dee8 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 13:26:46 +0000 Subject: [PATCH 48/56] docs: rename FossHost logo files to not include a dot in the name ...it upsets some versions of `dblatex` (used in PDF generation) which treat everything after the *first* dot as a file extension. Signed-off-by: Jim Klimov --- README.adoc | 2 +- docs/Makefile.am | 6 +++--- ...ark_56px.png => fosshost_org_Host_Dark_56px.png} | Bin ..._309px.png => fosshost_org_Host_Light_309px.png} | Bin ...ht_38px.png => fosshost_org_Host_Light_38px.png} | Bin docs/images/ci/jenkins-nut.css | 2 +- docs/images/ci/jenkins-nut.txt | 2 +- docs/nut.dict | 3 ++- 8 files changed, 8 insertions(+), 7 deletions(-) rename docs/images/ci/{fosshost.org_Host_Dark_56px.png => fosshost_org_Host_Dark_56px.png} (100%) rename docs/images/ci/{fosshost.org_Host_Light_309px.png => fosshost_org_Host_Light_309px.png} (100%) rename docs/images/ci/{fosshost.org_Host_Light_38px.png => fosshost_org_Host_Light_38px.png} (100%) diff --git a/README.adoc b/README.adoc index 1ed2dd4417..2121366665 100644 --- a/README.adoc +++ b/README.adoc @@ -800,7 +800,7 @@ endif::env-github[] See more at link:https://stories.jenkins.io/user-story/jenkins-is-the-way-for-networkupstools/[Jenkins is the way to build multi-platform NUT] article. -| image:images/ci/fosshost.org_Host_Light_38px.png[alt="Fosshost logo",width="112",height="38"] +| image:images/ci/fosshost_org_Host_Light_38px.png[alt="Fosshost logo",width="112",height="38"] | Fosshost provided virtual machines where the multi-platform NUT CI farm with a link:https://github.com/networkupstools/jenkins-dynamatrix/[jenkins-dynamatrix] link:https://github.com/networkupstools/nut/blob/master/Jenkinsfile-dynamatrix[setup] diff --git a/docs/Makefile.am b/docs/Makefile.am index 4eb2f73071..40d502a104 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -29,9 +29,9 @@ IMAGE_LOGO_FILES = \ images/ci/CircleCI_vertical_black_logo.png \ images/ci/DO_Powered_by_Badge_blue.png \ images/ci/DO_Powered_by_Badge_blue_140pxW.png \ - images/ci/fosshost.org_Host_Dark_56px.png \ - images/ci/fosshost.org_Host_Light_309px.png \ - images/ci/fosshost.org_Host_Light_38px.png \ + images/ci/fosshost_org_Host_Dark_56px.png \ + images/ci/fosshost_org_Host_Light_309px.png \ + images/ci/fosshost_org_Host_Light_38px.png \ images/ci/gandi-ar21.png \ images/ci/gandi-ar21.svg \ images/ci/GitHub-Mark-140pxW.png \ diff --git a/docs/images/ci/fosshost.org_Host_Dark_56px.png b/docs/images/ci/fosshost_org_Host_Dark_56px.png similarity index 100% rename from docs/images/ci/fosshost.org_Host_Dark_56px.png rename to docs/images/ci/fosshost_org_Host_Dark_56px.png diff --git a/docs/images/ci/fosshost.org_Host_Light_309px.png b/docs/images/ci/fosshost_org_Host_Light_309px.png similarity index 100% rename from docs/images/ci/fosshost.org_Host_Light_309px.png rename to docs/images/ci/fosshost_org_Host_Light_309px.png diff --git a/docs/images/ci/fosshost.org_Host_Light_38px.png b/docs/images/ci/fosshost_org_Host_Light_38px.png similarity index 100% rename from docs/images/ci/fosshost.org_Host_Light_38px.png rename to docs/images/ci/fosshost_org_Host_Light_38px.png diff --git a/docs/images/ci/jenkins-nut.css b/docs/images/ci/jenkins-nut.css index 5861bddd82..634bc00de0 100644 --- a/docs/images/ci/jenkins-nut.css +++ b/docs/images/ci/jenkins-nut.css @@ -66,6 +66,6 @@ background: url("/userContent/layout/DO_Powered_by_Badge_blue_140pxW.png"); /* .page-footer__footer-id-placeholder { -background: url("/userContent/layout/fosshost.org_Host_Dark_56px.png") no-repeat; +background: url("/userContent/layout/fosshost_org_Host_Dark_56px.png") no-repeat; } */ diff --git a/docs/images/ci/jenkins-nut.txt b/docs/images/ci/jenkins-nut.txt index f6fc75dcc1..b7ca13378a 100644 --- a/docs/images/ci/jenkins-nut.txt +++ b/docs/images/ci/jenkins-nut.txt @@ -16,7 +16,7 @@ downscaled image for the Jenkins dashboard banner. There are variants in several resolutions available, and options with a larger or smaller NUT logo served on the Jenkins butler's plate. -The fosshost.org_Host_Dark_56px.png was downscaled from resources +The fosshost_org_Host_Dark_56px.png was downscaled from resources at https://fosshost.org/media/ to fit into the Jenkins dashboard banner and remain readable. Thanks to Fosshost for providing the machines involved in the new NUT CI farm! diff --git a/docs/nut.dict b/docs/nut.dict index 64deb36f8a..122595c226 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3457 utf-8 +personal_ws-1.1 en 3458 utf-8 AAC AAS ABI @@ -2088,6 +2088,7 @@ forcessl formatconfig formatparam formatstring +fosshost fp freebsd freeipmi From c4a8ac5ca1be73629a49fdefbe139d8daf77c19e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 14:55:36 +0000 Subject: [PATCH 49/56] Makefile.am: spellcheck "scripts/installer" too [#2288] Signed-off-by: Jim Klimov --- Makefile.am | 1 + docs/nut.dict | 12 +++++++++++- .../installer/common/README_ipp-os-shutdown.adoc | 14 +++++++------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index b0f25ebb20..3e33c412cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -149,6 +149,7 @@ spellcheck spellcheck-interactive: (cd $(builddir)/scripts/Windows && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/scripts/devd && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/scripts/hotplug && $(MAKE) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/installer && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/scripts/python && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/scripts/systemd && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/scripts/udev && $(MAKE) -s $@) || RES=$$? ; \ diff --git a/docs/nut.dict b/docs/nut.dict index 122595c226..96b530f9c3 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3458 utf-8 +personal_ws-1.1 en 3468 utf-8 AAC AAS ABI @@ -550,6 +550,7 @@ IPBX IPC IPM IPP +IPSS IPs IPv IRC @@ -942,6 +943,7 @@ POSIX POWERDOWNFLAG POWEREX POWERLINE +POWERSTATE PPA PPD PPDn @@ -1145,6 +1147,7 @@ SCO SCR SDA SDE +SDFLAG SDR SDRnnnnn SDT @@ -1164,6 +1167,7 @@ SGI SHA SHUTDOWNCMD SHUTDOWNEXIT +SHUTDOWNSCRIPT SIG SIGHUP SIGINT @@ -1383,6 +1387,7 @@ UNV UPGUARDS UPM UPOII +UPP UPS's UPSCONN UPSDESC @@ -1813,6 +1818,7 @@ clepple clicky cls clueful +clusterware cmake cmd cmdline @@ -2290,6 +2296,7 @@ ipmi ipmidetectd ipmimonitoring ipmipsu +ipp ippon ipv ipxe @@ -2784,6 +2791,7 @@ powerdev powerdown powerdownflag powerfactor +powerfail powerman powermand powermust @@ -2929,6 +2937,7 @@ rts ru rubygem runlevel +runnable runtime runtimecal runtimek @@ -3365,6 +3374,7 @@ virsh virt virtinst virtualization +virtualized vivo vo vod diff --git a/scripts/installer/common/README_ipp-os-shutdown.adoc b/scripts/installer/common/README_ipp-os-shutdown.adoc index bf15dbe553..c565cf9d75 100644 --- a/scripts/installer/common/README_ipp-os-shutdown.adoc +++ b/scripts/installer/common/README_ipp-os-shutdown.adoc @@ -83,13 +83,13 @@ It is recommended to configure `SHUTDOWN_TIMER=-1` (default) on those more important hosts which should stay up as long as possible and only shut down if all required UPSes have posted a low-battery status or forced-shutdown command. These hosts would by default schedule delayed -UPS powercycling. To be on the safe side, sufficient `shutdown_duration` +UPS power-cycling. To be on the safe side, sufficient `shutdown_duration` seconds should be configured in their `netxml-ups` driver blocks in the `/usr/local/ups/etc/ups.conf` file on the host. If the customer elects to use the early shutdown strategy for all hosts, the `POWERDOWNFLAG_USER=enforce` should be configured in the hosts with -the highest `SHUTDOWN_TIMER` value so they would cause UPS powercycling. +the highest `SHUTDOWN_TIMER` value so they would cause UPS power-cycling. Do not forget to define sufficient `DELAY` value for the OS shutdown to complete before the UPS turns itself off. The UPS would turn on the load automatically after some time, when external power is back and it has @@ -100,11 +100,11 @@ web-interface for the UPS). * Install the package as usual -- Uncompress the `ipp-*.tar.gz` archive for your OS +- Un-compress the `ipp-*.tar.gz` archive for your OS - Change into the resulting `ipp-*` subdirectory -- (optional) If a complete reinstallation is desired (including removal +- (optional) If a complete re-installation is desired (including removal of old configuration files so they do not conflict with the new delivery), please also execute `IPP_WIPE_OLD_CONFIG=yes; export IPP_WIPE_OLD_CONFIG` in the shell before running the installation script @@ -152,7 +152,7 @@ either `$SDFLAG_HALT` (halt) or `$SDFLAG_REBOOT` (reboot). If the customer elects to use the early shutdown strategy for all hosts, the `POWERDOWNFLAG_USER=enforce` should be configured in the `ipp.conf` file on hosts with the highest `SHUTDOWN_TIMER` value so they would cause -UPS powercycling explicitly. By default, it may be enabled or forbidden +UPS power-cycling explicitly. By default, it may be enabled or forbidden depending on the cause of shutdown. Make sure to define a sufficient `DELAY` value (in seconds) as well, for @@ -184,7 +184,7 @@ ONBATT) is defined manually in the `ipp.conf` file and shutdown routine has started (and reported to be irreversible) - to report that the shutdown is in irreversible stage, as reaction -to CTRL+C during console-run invokations like `ipp-os-shutdown -t now` +to CTRL+C during console-run invocations like `ipp-os-shutdown -t now` - to execute custom shutdown script if it is found, and to skip it if not available @@ -202,7 +202,7 @@ the Eaton NMC Web-GUI - to implement numerous fixes and improvements in the `install.sh` script, including integration of new settings for early shutdown -and UPS powercycling strategy +and UPS power-cycling strategy === A few important notes helpful during testing From 909ef6bdc43ab2071c1dd453de329a2292843806 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 13:33:59 +0000 Subject: [PATCH 50/56] Makefile.am: use jobserver for spellcheck* callouts; ensure .prep-src-docs are pre-generated Signed-off-by: Jim Klimov --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 3e33c412cc..38174dd698 100644 --- a/Makefile.am +++ b/Makefile.am @@ -138,7 +138,9 @@ distclean-local: # Hook the documentation building and validating recipes # Note: these are optionally available (as determined during configure runs) spellcheck spellcheck-interactive: - @RES=0; \ + +@RES=0; \ + (cd $(builddir)/docs && $(MAKE) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ + (cd $(builddir)/docs/man && $(MAKE) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ (cd $(builddir)/docs && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/docs/man && $(MAKE) -s $@) || RES=$$? ; \ (cd $(builddir)/conf && $(MAKE) -s $@) || RES=$$? ; \ From 23b6ea648207d8576bbb620d3a4b4d7f8384e507 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 14:51:34 +0000 Subject: [PATCH 51/56] Makefile.am: comment how to maintain list of subdirs for spellchecking TOTHINK: Do we want to just automate this discovery? Signed-off-by: Jim Klimov --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 38174dd698..5014ec91a4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -137,6 +137,7 @@ distclean-local: # Hook the documentation building and validating recipes # Note: these are optionally available (as determined during configure runs) +# Maint: grep -l 'SPELLCHECK_' `git grep -lw spellcheck '*.am'` spellcheck spellcheck-interactive: +@RES=0; \ (cd $(builddir)/docs && $(MAKE) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ From 5b593ab61ad877e2ed4aae0e6a9feb157fac60f3 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 14:46:42 +0000 Subject: [PATCH 52/56] */Makefile.am: pass (top_)(src|build)dir, MKDIR_P and AM_MAKEFLAGS of caller into docs/Makefile parsing Signed-off-by: Jim Klimov --- conf/Makefile.am | 13 ++++++++----- data/Makefile.am | 11 +++++++---- data/html/Makefile.am | 13 ++++++++----- docs/man/Makefile.am | 11 +++++++---- scripts/Makefile.am | 13 ++++++++----- scripts/Solaris/Makefile.am | 13 ++++++++----- scripts/Windows/Makefile.am | 13 ++++++++----- scripts/devd/Makefile.am | 13 ++++++++----- scripts/hotplug/Makefile.am | 13 ++++++++----- scripts/installer/Makefile.am | 13 ++++++++----- scripts/python/Makefile.am | 13 ++++++++----- scripts/systemd/Makefile.am | 13 ++++++++----- scripts/udev/Makefile.am | 13 ++++++++----- scripts/upsdrvsvcctl/Makefile.am | 13 ++++++++----- tests/NIT/Makefile.am | 13 ++++++++----- 15 files changed, 118 insertions(+), 73 deletions(-) diff --git a/conf/Makefile.am b/conf/Makefile.am index 8adf280071..1dd595111b 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -19,22 +19,25 @@ nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample SPELLCHECK_SRC = $(dist_sysconf_DATA) \ upssched.conf.sample.in upsmon.conf.sample.in -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ MAINTAINERCLEANFILES = Makefile.in .dirstamp diff --git a/data/Makefile.am b/data/Makefile.am index df4cd1a8d1..3c0526bd2c 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -6,15 +6,18 @@ dist_data_DATA = cmdvartab nodist_data_DATA = driver.list EXTRA_DIST = evolution500.seq epdu-managed.dev -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ cmdvartab-spellchecked: cmdvartab Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="cmdvartab" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="cmdvartab" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ MAINTAINERCLEANFILES = Makefile.in .dirstamp CLEANFILES = *.pdf *.html *-spellchecked diff --git a/data/html/Makefile.am b/data/html/Makefile.am index 0ef0652637..6003976386 100644 --- a/data/html/Makefile.am +++ b/data/html/Makefile.am @@ -9,22 +9,25 @@ EXTRA_DIST = README.adoc SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 0fb31e84d6..2931bc5252 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -1120,18 +1120,21 @@ else !HAVE_ASCIIDOC endif !HAVE_ASCIIDOC -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# +$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *.txt-spellchecked: Makefile.am $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .txt.txt-spellchecked: - +$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - +$(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # When building out-of-tree, be sure to have all asciidoc resources # under the same dir structure (tool limitation) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 4ca7fdb52a..195cc93207 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -32,22 +32,25 @@ SUBDIRS = augeas devd hotplug installer python systemd udev ufw Solaris Windows SPELLCHECK_SRC = README.adoc RedHat/README.adoc usb_resetter/README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked RedHat/*-spellchecked usb_resetter/*-spellchecked diff --git a/scripts/Solaris/Makefile.am b/scripts/Solaris/Makefile.am index bd7c6ad84e..1d136576b2 100644 --- a/scripts/Solaris/Makefile.am +++ b/scripts/Solaris/Makefile.am @@ -93,22 +93,25 @@ check-local-solaris-smf: $(SOLARIS_SMF_MANIFESTS) SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/Windows/Makefile.am b/scripts/Windows/Makefile.am index efc555de1f..821085dc26 100644 --- a/scripts/Windows/Makefile.am +++ b/scripts/Windows/Makefile.am @@ -74,21 +74,24 @@ endif HAVE_MINGW_RESGEN SPELLCHECK_SRC = README.adoc DriverInstaller/README.adoc Installer/README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ MAINTAINERCLEANFILES = Makefile.in .dirstamp diff --git a/scripts/devd/Makefile.am b/scripts/devd/Makefile.am index d4801e55e3..bcdb15cbf7 100644 --- a/scripts/devd/Makefile.am +++ b/scripts/devd/Makefile.am @@ -33,21 +33,24 @@ EXTRA_DIST += nut-usb.conf.in nut-usb.quirks SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/hotplug/Makefile.am b/scripts/hotplug/Makefile.am index 7666ab93d5..57e83e5c92 100644 --- a/scripts/hotplug/Makefile.am +++ b/scripts/hotplug/Makefile.am @@ -25,21 +25,24 @@ MAINTAINERCLEANFILES += libhid.usermap SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/installer/Makefile.am b/scripts/installer/Makefile.am index e661f19564..75fd999203 100644 --- a/scripts/installer/Makefile.am +++ b/scripts/installer/Makefile.am @@ -32,22 +32,25 @@ EXTRA_DIST = \ SPELLCHECK_SRC = README.adoc common/README_ipp-os-shutdown.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/python/Makefile.am b/scripts/python/Makefile.am index 7003c62ef7..92948295ae 100644 --- a/scripts/python/Makefile.am +++ b/scripts/python/Makefile.am @@ -196,22 +196,25 @@ SPELLCHECK_SRC = \ app/README.adoc \ module/README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked */*-spellchecked diff --git a/scripts/systemd/Makefile.am b/scripts/systemd/Makefile.am index fa34901c31..07dfad20e8 100644 --- a/scripts/systemd/Makefile.am +++ b/scripts/systemd/Makefile.am @@ -41,22 +41,25 @@ endif SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/udev/Makefile.am b/scripts/udev/Makefile.am index 2c7df88abc..277a70d8e2 100644 --- a/scripts/udev/Makefile.am +++ b/scripts/udev/Makefile.am @@ -38,21 +38,24 @@ EXTRA_DIST += nut-usbups.rules.in SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES += *-spellchecked diff --git a/scripts/upsdrvsvcctl/Makefile.am b/scripts/upsdrvsvcctl/Makefile.am index 43bb633b1b..a29911c7b6 100644 --- a/scripts/upsdrvsvcctl/Makefile.am +++ b/scripts/upsdrvsvcctl/Makefile.am @@ -14,22 +14,25 @@ EXTRA_DIST += nut-driver-enumerator.sh.in upsdrvsvcctl.in SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/tests/NIT/Makefile.am b/tests/NIT/Makefile.am index e0638d26bd..db7144cbdf 100644 --- a/tests/NIT/Makefile.am +++ b/tests/NIT/Makefile.am @@ -33,22 +33,25 @@ check-NIT-devel: $(abs_srcdir)/nit.sh SPELLCHECK_SRC = README.adoc -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked From e4d1d13f13aecb0d4973e9e5881b9aa571a97d35 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 15:28:23 +0000 Subject: [PATCH 53/56] scripts/python/module/Makefile.am: fix AM_FLAGS => AM_MAKEFLAGS Signed-off-by: Jim Klimov --- scripts/python/module/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/python/module/Makefile.am b/scripts/python/module/Makefile.am index 17659223eb..8e0c02a53d 100644 --- a/scripts/python/module/Makefile.am +++ b/scripts/python/module/Makefile.am @@ -59,8 +59,8 @@ PyNUTClient: .pypi-src upload publish: @echo " PYPI Checking upload type for module version '$(NUT_SOURCE_GITREV_NUMERIC)'" ; \ case x"`echo "$(NUT_SOURCE_GITREV_NUMERIC)" | tr -d '[0-9]'`" in \ - x..) echo " PYPI ...release"; $(MAKE) $(AM_FLAGS) upload-pypi ;; \ - x*) echo " PYPI ...testing"; $(MAKE) $(AM_FLAGS) upload-testpypi ;; \ + x..) echo " PYPI ...release"; $(MAKE) $(AM_MAKEFLAGS) upload-pypi ;; \ + x*) echo " PYPI ...testing"; $(MAKE) $(AM_MAKEFLAGS) upload-testpypi ;; \ esac # README.txt is also a part of module standard expectations @@ -119,9 +119,9 @@ upload publish: # Using pypa/setuptools .pypi-dist: .pypi-src - @$(MAKE) $(AM_FLAGS) .pypi-dist-pip-build || \ - $(MAKE) $(AM_FLAGS) .pypi-dist-obsolete || \ - $(MAKE) $(AM_FLAGS) .pypi-dist-pip-wheel + @$(MAKE) $(AM_MAKEFLAGS) .pypi-dist-pip-build || \ + $(MAKE) $(AM_MAKEFLAGS) .pypi-dist-obsolete || \ + $(MAKE) $(AM_MAKEFLAGS) .pypi-dist-pip-wheel @touch "$@" # The most modern approach as of 2023 From ec751dcf6572a8ad46a3eda293085bd28d48fa2c Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 15:28:42 +0000 Subject: [PATCH 54/56] docs/Makefile.am: fix AM_FLAGS => AM_MAKEFLAGS Signed-off-by: Jim Klimov --- docs/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 40d502a104..2f9988cbd2 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -227,7 +227,7 @@ DOCBUILD_CONVERT_GITHUB_LINKS = { \ $(top_builddir)/ChangeLog: +@echo " DOC-CHANGELOG-GENERATE $@" \ - && cd $(top_builddir) && $(MAKE) $(AM_FLAGS) $(@F) + && cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) $(@F) # 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"), From 1312b5f182589e8f234f02c242be215389a80545 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 15:35:19 +0000 Subject: [PATCH 55/56] */Makefile.am: be sure to use AM_MAKEFLAGS and invoke jobserver (+) everywhere we call another $(MAKE) Signed-off-by: Jim Klimov --- Makefile.am | 76 +++++++++++++++---------------- clients/Makefile.am | 2 +- common/Makefile.am | 2 +- conf/Makefile.am | 8 ++-- data/Makefile.am | 6 +-- data/html/Makefile.am | 8 ++-- docs/Makefile.am | 6 +-- drivers/Makefile.am | 2 +- scripts/Makefile.am | 8 ++-- scripts/Solaris/Makefile.am | 8 ++-- scripts/Windows/Makefile.am | 10 ++-- scripts/devd/Makefile.am | 8 ++-- scripts/hotplug/Makefile.am | 8 ++-- scripts/installer/Makefile.am | 8 ++-- scripts/python/Makefile.am | 8 ++-- scripts/python/module/Makefile.am | 4 +- scripts/systemd/Makefile.am | 8 ++-- scripts/udev/Makefile.am | 8 ++-- scripts/upsdrvsvcctl/Makefile.am | 8 ++-- server/Makefile.am | 2 +- tests/Makefile.am | 6 +-- tests/NIT/Makefile.am | 18 ++++---- tools/nut-scanner/Makefile.am | 6 +-- tools/nutconf/Makefile.am | 2 +- 24 files changed, 115 insertions(+), 115 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5014ec91a4..bac4f8eb2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -74,11 +74,11 @@ DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-pynut=app --with-nut_monitor=force distcheck-light: - $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck + +$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck # Make a distcheck (and check in particular) with enabled valgrind and debug info memcheck distcheck-valgrind: - $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck + +$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck # workaround the dist generated files that are also part of the distribution # Note that distcleancheck is disabled for now, while waiting for a proper @@ -126,10 +126,10 @@ maintainer-clean-local: # should be available during their clean-up). Just in case, we make sure # here that their sub-distcleans complete first. distclean-local: - @for DIR in $(SUBDIRS) ; do \ + +@for DIR in $(SUBDIRS) ; do \ if test -f "$${DIR}/Makefile" ; then \ echo " DISTCLEAN in $${DIR}" >&2 ; \ - ( cd "$${DIR}" && $(MAKE) -s distclean ) || exit ; \ + ( cd "$${DIR}" && $(MAKE) $(AM_MAKEFLAGS) -s distclean ) || exit ; \ fi ; \ done $(AM_V_at)rm -rf .inst tmp autom4te.cache @@ -140,24 +140,24 @@ distclean-local: # Maint: grep -l 'SPELLCHECK_' `git grep -lw spellcheck '*.am'` spellcheck spellcheck-interactive: +@RES=0; \ - (cd $(builddir)/docs && $(MAKE) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ - (cd $(builddir)/docs/man && $(MAKE) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ - (cd $(builddir)/docs && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/docs/man && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/conf && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/data && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/data/html && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/Solaris && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/Windows && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/devd && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/hotplug && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/installer && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/python && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/systemd && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/udev && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/scripts/upsdrvsvcctl && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/tests/NIT && $(MAKE) -s $@) || RES=$$? ; \ + (cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ + (cd $(builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \ + (cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/conf && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/data && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/data/html && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/Solaris && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/Windows && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/devd && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/hotplug && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/installer && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/python && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/systemd && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/udev && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/scripts/upsdrvsvcctl && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ + (cd $(builddir)/tests/NIT && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \ exit $$RES # Note: the "all-docs" and "check-docs" targets may require tools not @@ -227,7 +227,7 @@ maintainer-asciidocs: ) check-NIT check-NIT-devel: - cd $(builddir)/tests/NIT && $(MAKE) $@ + +cd $(builddir)/tests/NIT && $(MAKE) $(AM_MAKEFLAGS) $@ # This target adds syntax-checking for committed shell script files, # to avoid surprises and delays in finding fatal typos after packaging @@ -301,7 +301,7 @@ cppcheck: endif !HAVE_CPPCHECK sockdebug: - cd $(builddir)/server && $(MAKE) $(AM_MAKEFLAGS) sockdebug$(EXEEXT) + +cd $(builddir)/server && $(MAKE) $(AM_MAKEFLAGS) sockdebug$(EXEEXT) # ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: @@ -333,13 +333,13 @@ ChangeLog: tools/gitlog2changelog.py dummy-stamp fi ChangeLog.adoc: ChangeLog - cd $(abs_top_builddir)/docs && $(MAKE) ../ChangeLog.adoc + +cd $(abs_top_builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) ../ChangeLog.adoc nut_version.h include/nut_version.h: - cd $(abs_top_builddir)/include && $(MAKE) nut_version.h + +cd $(abs_top_builddir)/include && $(MAKE) $(AM_MAKEFLAGS) nut_version.h tools/gitlog2changelog.py: tools/gitlog2changelog.py.in - cd $(@D) && $(MAKE) -s $(@F) + +cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) -s $(@F) # ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes @@ -365,35 +365,35 @@ build: @echo $(WARN) @echo "Warning: 'make build' is deprecated. Use 'make all' instead." @echo $(WARN) - $(MAKE) $(AM_MAKEFLAGS) all + +$(MAKE) $(AM_MAKEFLAGS) all install-bin: @echo $(WARN) @echo "Warning: 'make install-bin' is deprecated." @echo "Use 'make install-exec' instead for a similar effect." @echo $(WARN) - cd common; $(MAKE) $(AM_MAKEFLAGS) install - cd drivers; $(MAKE) $(AM_MAKEFLAGS) install - cd server; $(MAKE) $(AM_MAKEFLAGS) install - cd clients; $(MAKE) $(AM_MAKEFLAGS) install + +cd common; $(MAKE) $(AM_MAKEFLAGS) install + +cd drivers; $(MAKE) $(AM_MAKEFLAGS) install + +cd server; $(MAKE) $(AM_MAKEFLAGS) install + +cd clients; $(MAKE) $(AM_MAKEFLAGS) install install-man: install-data-recursive @echo $(WARN) @echo "Warning: 'make install-man' is deprecated." @echo "Use 'cd man; make install' instead." @echo $(WARN) - cd man; $(MAKE) $(AM_MAKEFLAGS) install + +cd man; $(MAKE) $(AM_MAKEFLAGS) install install-conf: @echo $(WARN) @echo "Warning: 'make install-conf' is deprecated." @echo "Use 'cd conf; make install' instead." @echo $(WARN) - cd conf; $(MAKE) $(AM_MAKEFLAGS) install + +cd conf; $(MAKE) $(AM_MAKEFLAGS) install # The target install-data already has a standardized meaning under automake install-dirs: @echo $(WARN) @echo "Warning: 'make install-dirs' is deprecated." @echo "Use 'make installdirs' instead." @echo $(WARN) - $(MAKE) installdirs + +$(MAKE) installdirs cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \ install-cgi-man install-cgi-conf install-cgi-html: @echo "Error: 'make $@' no longer exists." @@ -428,7 +428,7 @@ MAINTAINERCLEANFILES += $(MAINTAINERCLEANFILES_DISTBALL) MAINTAINERCLEANFILES += $(MAINTAINERCLEANFILES_PACKAGES) package: dist - DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \ + +DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \ rm -rf "$$DESTDIR"; \ case "`uname -s`" in \ "HP-UX") \ @@ -468,8 +468,8 @@ if HAVE_WINDOWS # anything. install-win-bundle: all @if test -z "$(DESTDIR)" ; then echo "ERROR: '$@': Bundle may only be installed to some DESTDIR prototype area'" >&2 ; exit 1; fi - $(MAKE) $(AM_MAKEFLAGS) DESTDIR='$(DESTDIR)' install - $(MAKE) $(AM_MAKEFLAGS) DESTDIR='$(DESTDIR)' install-win-bundle-thirdparty + +$(MAKE) $(AM_MAKEFLAGS) DESTDIR='$(DESTDIR)' install + +$(MAKE) $(AM_MAKEFLAGS) DESTDIR='$(DESTDIR)' install-win-bundle-thirdparty install-win-bundle-thirdparty: @if test -z "$(DESTDIR)" ; then echo "ERROR: '$@': Bundle may only be installed to some DESTDIR prototype area'" >&2 ; exit 1; fi diff --git a/clients/Makefile.am b/clients/Makefile.am index c00bea373f..b873046cc0 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -20,7 +20,7 @@ AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_srcdir)/include $(top_builddir)/common/libcommon.la \ $(top_builddir)/common/libcommonclient.la \ $(top_builddir)/common/libparseconf.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) LDADD_FULL = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS) if WITH_SSL diff --git a/common/Makefile.am b/common/Makefile.am index 0f226f1617..a65f2d5dc0 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -42,7 +42,7 @@ common.c: $(top_builddir)/include/nut_version.h $(srcdir)/common.c endif $(top_builddir)/include/nut_version.h: - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) libcommon_la_SOURCES = state.c str.c upsconf.c libcommonclient_la_SOURCES = state.c str.c diff --git a/conf/Makefile.am b/conf/Makefile.am index 1dd595111b..873d288324 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -24,20 +24,20 @@ SPELLCHECK_SRC = $(dist_sysconf_DATA) \ # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ MAINTAINERCLEANFILES = Makefile.in .dirstamp diff --git a/data/Makefile.am b/data/Makefile.am index 3c0526bd2c..5fba2e442b 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -11,13 +11,13 @@ EXTRA_DIST = evolution500.seq epdu-managed.dev # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ cmdvartab-spellchecked: cmdvartab Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="cmdvartab" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="cmdvartab" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ MAINTAINERCLEANFILES = Makefile.in .dirstamp CLEANFILES = *.pdf *.html *-spellchecked diff --git a/data/html/Makefile.am b/data/html/Makefile.am index 6003976386..19436e12da 100644 --- a/data/html/Makefile.am +++ b/data/html/Makefile.am @@ -14,20 +14,20 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/docs/Makefile.am b/docs/Makefile.am index 2f9988cbd2..33f0ff5d77 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -526,12 +526,12 @@ spellcheck: echo "ASPELL automatic execution line is : ( sed 's,^\(.*\)$$, \1,' < docfile.txt | $(ASPELL) -a $(ASPELL_NUT_TEXMODE_ARGS) $(ASPELL_NUT_COMMON_ARGS) | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' )" ; \ echo "ASPELL proceeding to spellchecking job..."; \ else true; fi - @FAILED="" ; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ + +@FAILED="" ; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ for docsrc in $(SPELLCHECK_SRC); do \ if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ echo "ASPELL MAKEFILE DEBUG: Will see from `pwd` if '$(SPELLCHECK_SRCDIR)/$${docsrc}-spellchecked' is up to date" >&2; \ else true ; fi ; \ - $(MAKE) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC="" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_BUILDDIR="$(SPELLCHECK_BUILDDIR)" SPELLCHECK_SRCDIR="$(SPELLCHECK_SRCDIR)" "$(SPELLCHECK_BUILDDIR)/$${docsrc}-spellchecked" \ + $(MAKE) $(AM_MAKEFLAGS) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC="" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_BUILDDIR="$(SPELLCHECK_BUILDDIR)" SPELLCHECK_SRCDIR="$(SPELLCHECK_SRCDIR)" "$(SPELLCHECK_BUILDDIR)/$${docsrc}-spellchecked" \ || FAILED="$$FAILED $(SPELLCHECK_SRCDIR)/$$docsrc"; \ done ; \ if test -n "$$FAILED" ; then \ @@ -586,7 +586,7 @@ spellcheck-interactive: echo "FAILED interactive spellcheck for the following sources (relative to `pwd`): $$FAILED" >&2 ; \ exit 1; \ fi ; exit 0 - $(MAKE) spellcheck-sortdict + +$(MAKE) $(AM_MAKEFLAGS) spellcheck-sortdict @echo "------------------------------------------------------------------------"; \ echo "Custom dictionary file $(NUT_SPELL_DICT) may have been updated now."; \ echo "Use 'git add -p docs/$(NUT_SPELL_DICT) && git checkout -- docs/$(NUT_SPELL_DICT) && make spellcheck-sortdict && git add -p docs/$(NUT_SPELL_DICT)'"; \ diff --git a/drivers/Makefile.am b/drivers/Makefile.am index 6d842dcd41..57169b2f91 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -13,7 +13,7 @@ $(top_builddir)/common/libcommon.la \ $(top_builddir)/common/libparseconf.la \ $(top_builddir)/clients/libupsclient.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) # by default, link programs in this directory with libcommon.la # (libtool version of the static lib, in order to access LTLIBOBJS) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 195cc93207..f0f59aa877 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -37,20 +37,20 @@ SPELLCHECK_SRC = README.adoc RedHat/README.adoc usb_resetter/README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked RedHat/*-spellchecked usb_resetter/*-spellchecked diff --git a/scripts/Solaris/Makefile.am b/scripts/Solaris/Makefile.am index 1d136576b2..3f01ec6034 100644 --- a/scripts/Solaris/Makefile.am +++ b/scripts/Solaris/Makefile.am @@ -98,20 +98,20 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/Windows/Makefile.am b/scripts/Windows/Makefile.am index 821085dc26..52e4d927f8 100644 --- a/scripts/Windows/Makefile.am +++ b/scripts/Windows/Makefile.am @@ -3,7 +3,7 @@ AM_CFLAGS = -I$(top_srcdir)/include ../include/nut_version.h: FORCE - (cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h) + +cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h EXTRA_DIST = \ winevent.mc \ @@ -79,19 +79,19 @@ SPELLCHECK_SRC = README.adoc DriverInstaller/README.adoc Installer/README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ MAINTAINERCLEANFILES = Makefile.in .dirstamp diff --git a/scripts/devd/Makefile.am b/scripts/devd/Makefile.am index bcdb15cbf7..e3a9967c2b 100644 --- a/scripts/devd/Makefile.am +++ b/scripts/devd/Makefile.am @@ -38,19 +38,19 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/hotplug/Makefile.am b/scripts/hotplug/Makefile.am index 57e83e5c92..8888492885 100644 --- a/scripts/hotplug/Makefile.am +++ b/scripts/hotplug/Makefile.am @@ -30,19 +30,19 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/installer/Makefile.am b/scripts/installer/Makefile.am index 75fd999203..ae236cf88b 100644 --- a/scripts/installer/Makefile.am +++ b/scripts/installer/Makefile.am @@ -37,20 +37,20 @@ SPELLCHECK_SRC = README.adoc common/README_ipp-os-shutdown.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/python/Makefile.am b/scripts/python/Makefile.am index 92948295ae..56eeaa97f4 100644 --- a/scripts/python/Makefile.am +++ b/scripts/python/Makefile.am @@ -201,20 +201,20 @@ SPELLCHECK_SRC = \ # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked */*-spellchecked diff --git a/scripts/python/module/Makefile.am b/scripts/python/module/Makefile.am index 8e0c02a53d..fc46eab0ad 100644 --- a/scripts/python/module/Makefile.am +++ b/scripts/python/module/Makefile.am @@ -57,7 +57,7 @@ PyNUTClient: .pypi-src # Tagged releases should only have three blocks of digits separated by dots upload publish: - @echo " PYPI Checking upload type for module version '$(NUT_SOURCE_GITREV_NUMERIC)'" ; \ + +@echo " PYPI Checking upload type for module version '$(NUT_SOURCE_GITREV_NUMERIC)'" ; \ case x"`echo "$(NUT_SOURCE_GITREV_NUMERIC)" | tr -d '[0-9]'`" in \ x..) echo " PYPI ...release"; $(MAKE) $(AM_MAKEFLAGS) upload-pypi ;; \ x*) echo " PYPI ...testing"; $(MAKE) $(AM_MAKEFLAGS) upload-testpypi ;; \ @@ -119,7 +119,7 @@ upload publish: # Using pypa/setuptools .pypi-dist: .pypi-src - @$(MAKE) $(AM_MAKEFLAGS) .pypi-dist-pip-build || \ + +@$(MAKE) $(AM_MAKEFLAGS) .pypi-dist-pip-build || \ $(MAKE) $(AM_MAKEFLAGS) .pypi-dist-obsolete || \ $(MAKE) $(AM_MAKEFLAGS) .pypi-dist-pip-wheel @touch "$@" diff --git a/scripts/systemd/Makefile.am b/scripts/systemd/Makefile.am index 07dfad20e8..7a0f37f7b9 100644 --- a/scripts/systemd/Makefile.am +++ b/scripts/systemd/Makefile.am @@ -46,20 +46,20 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/scripts/udev/Makefile.am b/scripts/udev/Makefile.am index 277a70d8e2..e0576d952c 100644 --- a/scripts/udev/Makefile.am +++ b/scripts/udev/Makefile.am @@ -43,19 +43,19 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFILE) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES += *-spellchecked diff --git a/scripts/upsdrvsvcctl/Makefile.am b/scripts/upsdrvsvcctl/Makefile.am index a29911c7b6..4cb4ad69d2 100644 --- a/scripts/upsdrvsvcctl/Makefile.am +++ b/scripts/upsdrvsvcctl/Makefile.am @@ -19,20 +19,20 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/server/Makefile.am b/server/Makefile.am index 24ce399500..878f16f588 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -12,7 +12,7 @@ # Make sure out-of-dir dependencies exist (especially when dev-building parts): $(top_builddir)/common/libcommon.la \ $(top_builddir)/common/libparseconf.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) # Avoid per-target CFLAGS, because this will prevent re-use of object # files. In any case, CFLAGS are only -I options, so there is no harm, diff --git a/tests/Makefile.am b/tests/Makefile.am index 8a4b622588..d7a1cd9ccc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,7 +29,7 @@ check_SCRIPTS = # NUT Integration Testing suite check-NIT check-NIT-devel: - cd "$(builddir)/NIT" && $(MAKE) $@ + +cd "$(builddir)/NIT" && $(MAKE) $(AM_MAKEFLAGS) $@ nutlogtest_SOURCES = nutlogtest.c nutlogtest_LDADD = $(top_builddir)/common/libcommon.la @@ -102,7 +102,7 @@ EXTRA_DIST += generic_gpio_utest.h generic_gpio_test.txt $(top_builddir)/drivers/libdummy_mockdrv.la \ $(top_builddir)/common/libnutconf.la \ $(top_builddir)/common/libcommon.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) ### Optional tests which can not be built everywhere # List of src files for CppUnit tests @@ -154,7 +154,7 @@ cppnit_SOURCES = $(CPPCLIENTTESTSRC) $(CPPUNITTESTERSRC) # only some parts of NUT): $(top_builddir)/clients/libnutclient.la \ $(top_builddir)/clients/libnutclientstub.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) else !HAVE_CPPUNIT # Just redistribute test source into tarball if not building tests diff --git a/tests/NIT/Makefile.am b/tests/NIT/Makefile.am index db7144cbdf..086519757e 100644 --- a/tests/NIT/Makefile.am +++ b/tests/NIT/Makefile.am @@ -25,11 +25,11 @@ check-NIT: $(abs_srcdir)/nit.sh # Make sure pre-requisites for NIT are fresh as we iterate check-NIT-devel: $(abs_srcdir)/nit.sh - @cd .. && ( $(MAKE) -s cppnit$(EXEEXT) || echo "OPTIONAL C++ test client test will be skipped" ) - @cd "$(top_builddir)/clients" && $(MAKE) -s upsc$(EXEEXT) upsrw$(EXEEXT) upsmon$(EXEEXT) - @cd "$(top_builddir)/server" && $(MAKE) -s upsd$(EXEEXT) - @cd "$(top_builddir)/drivers" && $(MAKE) -s dummy-ups$(EXEEXT) - @$(MAKE) check-NIT + +@cd .. && ( $(MAKE) $(AM_MAKEFLAGS) -s cppnit$(EXEEXT) || echo "OPTIONAL C++ test client test will be skipped" ) + +@cd "$(top_builddir)/clients" && $(MAKE) $(AM_MAKEFLAGS) -s upsc$(EXEEXT) upsrw$(EXEEXT) upsmon$(EXEEXT) + +@cd "$(top_builddir)/server" && $(MAKE) $(AM_MAKEFLAGS) -s upsd$(EXEEXT) + +@cd "$(top_builddir)/drivers" && $(MAKE) $(AM_MAKEFLAGS) -s dummy-ups$(EXEEXT) + +@$(MAKE) $(AM_MAKEFLAGS) check-NIT SPELLCHECK_SRC = README.adoc @@ -38,20 +38,20 @@ SPELLCHECK_SRC = README.adoc # paths when parsing the other makefile (e.g. MKDIR_P that may be defined # via expanded $(top_builddir)/install_sh): #%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ +# +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ # NOTE: Portable suffix rules do not allow prerequisites, so we shim them here # by a wildcard target in case the make implementation can put the two together. *-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) .sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ .in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -s -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +$(MAKE) -f $(top_builddir)/docs/Makefile $(AM_MAKEFLAGS) MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ CLEANFILES = *-spellchecked diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am index 9c7d01fbd6..08ec5919e4 100644 --- a/tools/nut-scanner/Makefile.am +++ b/tools/nut-scanner/Makefile.am @@ -24,12 +24,12 @@ EXTRA_DIST = README.adoc # Make sure we have the freshest files (no-op if built earlier and then # no driver sources and other dependencies were edited by a developer) $(NUT_SCANNER_DEPS): dummy - @cd .. && $(MAKE) $(AM_MAKEFLAGS) nut-scanner-deps + +@cd .. && $(MAKE) $(AM_MAKEFLAGS) nut-scanner-deps # Make sure out-of-dir dependencies exist (especially when dev-building parts): $(top_builddir)/common/libcommonclient.la \ $(top_builddir)/common/libcommon.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) # do not hard depend on '../include/nut_version.h', since it blocks # 'dist', and is only required for actual build, in which case @@ -54,7 +54,7 @@ CLEANFILES += $(LINKED_SOURCE_FILES) BUILT_SOURCES += $(LINKED_SOURCE_FILES) $(top_builddir)/include/nut_version.h: - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) # Note: we only build nut-scanner, and its library, if libltdl was found (required!) if WITH_NUT_SCANNER diff --git a/tools/nutconf/Makefile.am b/tools/nutconf/Makefile.am index be22d493d8..53663e4a53 100644 --- a/tools/nutconf/Makefile.am +++ b/tools/nutconf/Makefile.am @@ -25,7 +25,7 @@ endif WITH_NUTCONF $(top_builddir)/common/libcommon.la \ $(top_builddir)/common/libnutconf.la \ $(top_builddir)/tools/nut-scanner/libnutscan.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + +@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) dummy: From 031278d81845494272a4864f41fe2126152c1fae Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Feb 2024 15:43:53 +0000 Subject: [PATCH 56/56] NEWS.adoc: note revised recipes [#2318] Signed-off-by: Jim Klimov --- NEWS.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.adoc b/NEWS.adoc index 064b0d39ca..10319c9cd2 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -133,6 +133,8 @@ https://github.com/networkupstools/nut/milestone/10 * Fixed an issue for builds configured `--without-usb`. [#2263] * Added a fallback for `libgd` discovery (for CGI etc. builds). [#2287] * Made `aspell` TeX module detection more reliable. [#2206] + * Fixed recipes for completely out-of-tree builds to pass with documentation + generation and checking on all tested "make" implementations. [#2318] * Various other recipe and documentation clean-up efforts. [#2284, #2269, #2261]