Skip to content

Commit f36ce66

Browse files
authored
Merge e17d8a7 into 1211c56
2 parents 1211c56 + e17d8a7 commit f36ce66

File tree

13 files changed

+341
-113
lines changed

13 files changed

+341
-113
lines changed

Makefile.am

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,43 @@ SUBDIRS_ALL_LIBS_LOCAL = \
9494

9595
#all all-recursive all-am-local all-local: all-fanout-maybe
9696
all-recursive: all-fanout-maybe
97-
check-recursive install-recursive: generated-headers-with-a-touch
9897

99-
all check install: all-fanout-cleanup
98+
# Make sure automake-defined check/install goals begin with our hack for
99+
# touch-files for generated headers (so each depending sub-directory does
100+
# not re-evaluate those rules in whole); note that these goals may end up
101+
# also calling all-fanout-maybe (as they depend on "all"):
102+
check-recursive install-recursive: generated-headers-with-a-touch
100103

104+
# NOTE: Beside dependency above, also called from some code paths in
105+
# the all-fanout-maybe implementation:
101106
generated-headers-with-a-touch: @dotMAKE@
102-
$(MAKE) $(AM_MAKEFLAGS) NUT_VERSION_H_GENERATED=false nut_version.h
103-
$(MAKE) $(AM_MAKEFLAGS) touch-include-all-nut_version-generated.timestamp
104-
$(MAKE) $(AM_MAKEFLAGS) libupsclient-version.h
105-
$(MAKE) $(AM_MAKEFLAGS) touch-clients-all-libupsclient_version-generated.timestamp
107+
+$(MAKE) $(AM_MAKEFLAGS) NUT_VERSION_H_GENERATED=false nut_version.h
108+
+$(MAKE) $(AM_MAKEFLAGS) touch-include-all-nut_version-generated.timestamp
109+
+$(MAKE) $(AM_MAKEFLAGS) libupsclient-version.h
110+
+$(MAKE) $(AM_MAKEFLAGS) touch-clients-all-libupsclient_version-generated.timestamp
111+
112+
# After completing the automake-defined goals, clean up:
113+
all: all-fanout-cleanup
114+
check: check-fanout-cleanup
115+
install: install-fanout-cleanup
106116

107117
# Run as part of "all", but after the autotools-standard "all-recursive"
108118
# where we quiesce nut_version.h regeneration attempts for each subdir
109-
all-fanout-cleanup: all-recursive
119+
# which automake recipes iterate; similarly for "check" and "install":
120+
cleanup-touchfiles-for-generated-headers:
110121
@rm -f include/.all.nut_version-generated.timestamp \
111122
clients/.all.libupsclient_version-generated.timestamp
112123

124+
all-fanout-cleanup: all-recursive @dotMAKE@
125+
+@$(MAKE) $(AM_MAKEFLAGS) cleanup-touchfiles-for-generated-headers
126+
127+
check-fanout-cleanup: check-recursive @dotMAKE@
128+
+@$(MAKE) $(AM_MAKEFLAGS) cleanup-touchfiles-for-generated-headers
129+
130+
install-fanout-cleanup: install-recursive @dotMAKE@
131+
+@$(MAKE) $(AM_MAKEFLAGS) cleanup-touchfiles-for-generated-headers
132+
133+
# Called from generated-headers-with-a-touch:
113134
touch-include-all-nut_version-generated.timestamp:
114135
@[ -s include/nut_version.h ]
115136
@touch -r include/nut_version.h -d '-10 seconds' include/.all.nut_version-generated.timestamp && exit ; \
@@ -134,23 +155,23 @@ all-fanout-maybe: @dotMAKE@
134155
clients/.all.libupsclient_version-generated.timestamp
135156
+@if [ x"$(NUT_MAKE_SKIP_FANOUT)" = xtrue ] ; then \
136157
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
137-
echo " SUBDIR-MAKE $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
158+
echo " SUBDIR-MAKE SKIP $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
138159
fi ; \
139160
$(MAKE) $(AM_MAKEFLAGS) generated-headers-with-a-touch || exit ; \
140161
exit 0 ; \
141162
fi ; \
142163
case "-$(MAKEFLAGS) $(AM_MAKEFLAGS)" in \
143164
*-j|*-j" "*|*-{j,l}{0,1,2,3,4,5,6,7,8,9}*|*-[jl][0123456789]*|*{-l,--jobs,--load-average,--max-load}" "{-,0,1,2,3,4,5,6,7,8,9}*|*--jobserver*|*--jobs" "[0123456789]*|*--load-average" "[0123456789]*|*--max-load" "[0123456789]*) \
144165
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
145-
echo " SUBDIR-MAKE $@: implement optimization for parallel make as 'make all-fanout-subdirs'" ; \
166+
echo " SUBDIR-MAKE LAUNCH $@: implement optimization for parallel make as 'make all-fanout-subdirs'" ; \
146167
fi ; \
147168
$(MAKE) $(AM_MAKEFLAGS) all-fanout-subdirs || exit ; \
148169
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
149-
echo " SUBDIR-MAKE $@: optimization for parallel make as 'make all-fanout-subdirs' finished; now automake rules can follow up with default implementation of 'all-recursive' and/or 'all' (may try to regenerate some files again; should keep existing results though)" ; \
170+
echo " SUBDIR-MAKE FINISH $@: optimization for parallel make as 'make all-fanout-subdirs' finished; now automake rules can follow up with default implementation of 'all-recursive' and/or 'all' (may try to regenerate some files again; should keep existing results though)" ; \
150171
fi ;; \
151172
*) \
152173
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
153-
echo " SUBDIR-MAKE $@: skip optimization for parallel make - we seem to run sequentially now, seen MAKEFLAGS='$(MAKEFLAGS)' AM_MAKEFLAGS='$(AM_MAKEFLAGS)'" ; \
174+
echo " SUBDIR-MAKE SKIP $@: skip optimization for parallel make - we seem to run sequentially now, seen MAKEFLAGS='$(MAKEFLAGS)' AM_MAKEFLAGS='$(AM_MAKEFLAGS)'" ; \
154175
fi ; \
155176
$(MAKE) $(AM_MAKEFLAGS) generated-headers-with-a-touch || exit ; \
156177
;; \
@@ -234,12 +255,12 @@ SUBDIR_TGT_RULE = ( \
234255
[ x"$${TGT-}" != x ] || TGT="`echo '$@' | awk -F/ '{print $$1}'`" ; \
235256
[ x"$${DIR-}" != x ] || DIR="`echo '$@' | sed 's,^[^/]*/,,'`" ; \
236257
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
237-
echo " SUBDIR-MAKE STARTING $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR ..." ; \
258+
echo " SUBDIR-MAKE STARTING $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR ..." ; \
238259
fi ; \
239260
cd "$(abs_builddir)/$${DIR}" && \
240261
$(MAKE) $(AM_MAKEFLAGS) $${SUBDIR_TGT_MAKEFLAGS-} "$${TGT}" || { RES=$$?; echo " SUBDIR-MAKE FAILURE: 'make $$TGT' in $$DIR" >&2 ; exit $$RES ; } ; \
241262
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
242-
echo " SUBDIR-MAKE SUCCESS $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR" ; \
263+
echo " SUBDIR-MAKE SUCCESS $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR" ; \
243264
fi ; \
244265
)
245266

@@ -761,7 +782,7 @@ spellcheck spellcheck-interactive: @dotMAKE@
761782
if [ x"$(NUT_MAKE_SKIP_FANOUT)" = xtrue ] ; then \
762783
RES=0 ; \
763784
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
764-
echo " SUBDIR-MAKE $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
785+
echo " SUBDIR-MAKE SKIP $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
765786
fi ; \
766787
(cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) -k -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \
767788
(cd $(builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) -k -s $(abs_top_builddir)/docs/man/.prep-src-docs) || RES=$$? ; \
@@ -781,8 +802,9 @@ spellcheck spellcheck-interactive: @dotMAKE@
781802
fi ; \
782803
export SUBDIR_MAKE_VERBOSE ; \
783804
( $(MAKE) $(AM_MAKEFLAGS) SPELLCHECK_TGT='$@' SUBDIR_MAKE_VERBOSE="$${SUBDIR_MAKE_VERBOSE}" -k -s $(SPELLCHECK_DIRS) && exit ; \
784-
echo "WARNING: FAILED fanned-out attempt in $@, retrying with NUT_MAKE_SKIP_FANOUT" >&2 ; \
785-
$(MAKE) $(AM_MAKEFLAGS) NUT_MAKE_SKIP_FANOUT=true SPELLCHECK_TGT='$@' -k -s $(SPELLCHECK_DIRS) ) || exit ; \
805+
echo "WARNING: FAILED fanned-out attempt in $@, retrying with NUT_MAKE_SKIP_FANOUT" >&2 ; \
806+
$(MAKE) $(AM_MAKEFLAGS) NUT_MAKE_SKIP_FANOUT=true SPELLCHECK_TGT='$@' -k -s $(SPELLCHECK_DIRS) \
807+
) || exit ; \
786808
if [ x'$@' = xspellcheck-interactive ] ; then \
787809
echo "SUCCESS: $@: follow up with spellcheck-quick to revise and update timestamps"; \
788810
$(MAKE) $(AM_MAKEFLAGS) spellcheck-quick ; \

NEWS.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ https://github.com/networkupstools/nut/milestone/12
8686
not-requested (e.g. do not start `upsd` in `MODE=netclient`), even though
8787
the unit is nominally enabled; this should make packaging and providing
8888
service pre-sets more simple. [issue #837, PR #3233]
89+
+
90+
In a way, this should also fix fallout of a change delivered in NUT v2.8.4
91+
release, where `upsmon` could have started with `MODE=none` in `nut.conf`,
92+
but the `nutshutdown` script would bail out quickly and quietly. [PR #3008]
8993
* Fixed thread-safety of IP address printout in `libupsclient` method
9094
`upscli_tryconnect()` (practical bug seen in `nut-scanner` parallel scans).
9195
[issue #3234]
@@ -327,7 +331,7 @@ https://github.com/networkupstools/nut/milestone/12
327331

328332
- `upsd` data server updates:
329333
* Sometimes "Data for UPS [X] is stale" and "UPS [X] data is no longer
330-
stale" messages were logged in the same second, especially no busy
334+
stale" messages were logged in the same second, especially on busy
331335
systems. Now we allow one more second on top of `MAXAGE` setting to
332336
declare the device dead, just in case fractional/whole second rounding
333337
comes into play and breaks things. [issue #661]
@@ -502,6 +506,8 @@ several `FSD` notifications into one executed action. [PR #3097]
502506
* Added an option to (primarily) `--disable-threading` for systems with
503507
detected but broken `libpthread` support, or to test alternate code
504508
paths during development or in CI. [#3300]
509+
* Adjusted C++ header search path on Termux when `-isystem` is involved,
510+
as noted with NSS builds. [issues #1599, #1711, PR #3353]
505511

506512
- Recipes, CI and helper script updates not classified above:
507513
* Fixed CI recipes for PyPI publication of PyNUT(Client) module to also

clients/Makefile.am

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ CLEANFILES =
1616
# optionally includes "common.h" with the NUT build setup - and this option
1717
# was never triggered in fact, not until pushed through command line like this:
1818
AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_builddir)/include -I$(top_srcdir)/include
19-
if WITH_SSL
20-
AM_CXXFLAGS += $(LIBSSL_CFLAGS)
21-
endif WITH_SSL
19+
if WITH_SSL_CXX
20+
AM_CXXFLAGS += $(LIBSSL_CXXFLAGS)
21+
endif WITH_SSL_CXX
2222

2323
# Make sure out-of-dir dependencies exist (especially when dev-building parts):
2424
$(top_builddir)/include/nut_version.h \
@@ -309,9 +309,9 @@ if HAVE_WINDOWS
309309
# Many versions of MingW seem to fail to build non-static DLL without this
310310
libnutclient_la_LDFLAGS += -no-undefined
311311
endif HAVE_WINDOWS
312-
if WITH_SSL
312+
if WITH_SSL_CXX
313313
libnutclient_la_LIBADD += $(LIBSSL_LDFLAGS_RPATH) $(LIBSSL_LIBS)
314-
endif WITH_SSL
314+
endif WITH_SSL_CXX
315315
else !HAVE_CXX11
316316
EXTRA_DIST += nutclient.h nutclient.cpp
317317
endif !HAVE_CXX11

0 commit comments

Comments
 (0)