Skip to content

Commit

Permalink
Merge pull request networkupstools#2318 from jimklimov/fix-make-docs-…
Browse files Browse the repository at this point in the history
…out-of-tree

Fix `make docs` for runs made completely out-of-tree
  • Loading branch information
jimklimov authored Feb 22, 2024
2 parents 0180e4a + 031278d commit bc41372
Show file tree
Hide file tree
Showing 39 changed files with 489 additions and 214 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Makefile.in
/missing
/test-driver
*-spellchecked
*-prepped
*.adoc-parsed
*.adoc*.tmp
*.txt*.tmp
Expand Down
97 changes: 56 additions & 41 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -126,34 +126,38 @@ 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
$(AM_V_at)find "$(builddir)" -type d -name '.deps' | while read DIR ; do rm -rf "$${DIR}" ; done

# 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 $@) || 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/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=$$? ; \
+@RES=0; \
(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
Expand All @@ -164,10 +168,10 @@ spellcheck spellcheck-interactive:
doc spellcheck-sortdict \
all-docs check-docs \
man all-man man-man check-man man-html all-html:
cd $(builddir)/docs && $(MAKE) $@
+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
Expand Down Expand Up @@ -223,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
Expand Down Expand Up @@ -297,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:
Expand All @@ -313,18 +317,29 @@ 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) || \
{ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ ; }
cd $(abs_top_srcdir) && \
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) $(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
Expand All @@ -350,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."
Expand Down Expand Up @@ -413,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") \
Expand Down Expand Up @@ -453,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
Expand Down
2 changes: 2 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
17 changes: 12 additions & 5 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion clients/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions conf/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 8 additions & 5 deletions data/html/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ nut.dict.sorted
/tmp/
docinfo.xml.in.tmp
/asciidoc-vars.conf.lastrev.tmp
.prep-src-docs*
Loading

0 comments on commit bc41372

Please sign in to comment.