Skip to content

Fix docs makefiles#2091

Merged
jimklimov merged 2 commits intonetworkupstools:masterfrom
jimklimov:issue-2081
Oct 7, 2023
Merged

Fix docs makefiles#2091
jimklimov merged 2 commits intonetworkupstools:masterfrom
jimklimov:issue-2081

Conversation

@jimklimov
Copy link
Copy Markdown
Member

@jimklimov jimklimov commented Oct 5, 2023

Closes: #2081 (to always distribute all man page sources - even if the build was configured only for a few drivers)

Note: thinking about it, this might still falter in contrived use-cases... The dist tarball is supposed to include pre-built man pages (from the distributor's system), so the building systems have an option to not re-generate the pages or even to not have tools for that, and yet to produce packages convenient for end-users. A configure --with-drivers=usbhid-ups sort of build config would only pre-generate and dist-tarball that driver's man page. TLDR: "real" dist tarballs should be made on systems capable of (and configured to) building all driver types.

TODO: In fact, no system is able to build all driver types nowadays - e.g. some are specific to MacOS or Linux. A recipe toggle is needed, perhaps to configure a build for dist purposes and force building all man pages (and/or other doc formats) regardless of being able to build the drivers.

Other than that, with this PR I've also caught an annoying problem that sometimes docs/asciidoc-vars.conf just disappeared. This was tracked down to strange mis-behavior of (GNU?) make: if I make spellcheck and then e.g. make dist, it tries to:

Makefile:1224: update target 'asciidoc-vars.conf' due to: asciidoc-vars.conf-spellchecked

and passes an empty "$(SPELLCHECK_SRC_ONE)" into it, however the target "$@" is set to asciidoc-vars.conf (for a rule targeting explicitly $(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: ...!) As a result, it deletes the target file and then fails to process the empty input. Strange case (only for this file) got strange workarounds with this PR...

Just to clarify: it should never have got to update the documentation source due to touch-file at all, it should be the other way around!

…if the build was configured for just some subset of drivers [networkupstools#2081]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…filenames

Sometimes we get this:

	Makefile:1216: update target 'asciidoc-vars.conf' due to: asciidoc-vars.conf-spellchecked
	 rm -f "asciidoc-vars.conf" || true ; \
	 echo "  ASPELL   Spell checking on ./"; \
	 ...  touch "asciidoc-vars.conf"

	  ASPELL   Spell checking on ./
	sed: read error on stdin: Is a directory

Only seen for "asciidoc-vars.conf" so far:

:; git checkout -f ; touch docs/asciidoc-vars.conf ; make spellcheck ; clear ; make dist -j 20 --trace V=1

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added bug packaging CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) portability We want NUT to build and run everywhere possible labels Oct 5, 2023
@jimklimov jimklimov added this to the 2.8.1 milestone Oct 5, 2023
@jimklimov jimklimov merged commit 5dc7970 into networkupstools:master Oct 7, 2023
@jimklimov jimklimov deleted the issue-2081 branch October 7, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) packaging portability We want NUT to build and run everywhere possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make distcheck errors with: No rule to make target 'al175.txt', needed by 'check-man-txt'

1 participant