Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci_build.sh auto-detection of paths and flags for trickier distros #2781

Merged
merged 25 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c170ca1
ci_build.sh: detect OmniOS CE extra repo as part of SYS_PKG_CONFIG_PATH
jimklimov Jan 22, 2025
b2f53c2
docs/config-prereqs.txt: update for OmniOS r151052
jimklimov Jan 22, 2025
604deec
ci_build.sh: prepare also BUILTIN_PKG_CONFIG_PATH as part of the equa…
jimklimov Jan 22, 2025
9e85e3d
ci_build.sh: add OmniOS CE "Extra" repository binaries to PATH if pre…
jimklimov Jan 22, 2025
dc839a3
ci_build.sh: refactor with logic moved from BUILD_TYPE=default* to re…
jimklimov Jan 22, 2025
9767476
ci_build.sh: teach developer-oriented runs some tricks from CI
jimklimov Jan 22, 2025
4d41658
ci_build.sh: clean up indentations
jimklimov Jan 22, 2025
fb2fa8e
ci_build.sh: refactor detect_platform_PKG_CONFIG_PATH_and_FLAGS() for…
jimklimov Jan 23, 2025
1aeee6f
ci_build.sh: refactor detect_platform_PKG_CONFIG_PATH_and_FLAGS() wit…
jimklimov Jan 23, 2025
a69cc42
ci_build.sh: refactor detect_platform_PKG_CONFIG_PATH_and_FLAGS() wit…
jimklimov Jan 23, 2025
7f7a84e
ci_build.sh: normalize_path() the PATH and CCACHE_PATH after guesswor…
jimklimov Jan 23, 2025
e896ab8
ci_build.sh: apply compiler/linker flags possibly adjusted by detect_…
jimklimov Jan 23, 2025
aaf5185
m4/nut_check_libltdl.m4: fix re-detection with CFLAGS added
jimklimov Jan 23, 2025
9b3eed4
docs/config-prereqs.txt: add pkg name for libltdl on OmniOS
jimklimov Jan 23, 2025
634a71f
ci_build.sh: avoid exporting compiler flags for "windows-msys2" semi-…
jimklimov Jan 23, 2025
9f4b94e
docs/config-prereqs.txt: revise OmniOS chapter to better reflect curr…
jimklimov Jan 24, 2025
9ecbe13
docs/config-prereqs.txt: revise OmniOS chapter to note run-time linki…
jimklimov Jan 24, 2025
21b61f3
Makefile.am: embed PKG_CONFIG_PATH we were built with into DISTCHECK_…
jimklimov Jan 24, 2025
fd6c542
Makefile.am: do not evaluate DISTCHECK_CONFIGURE_FLAGS right when cal…
jimklimov Jan 24, 2025
1e09937
tools/gitlog2version.sh: fix getver_default() determination of NUT_VE…
jimklimov Jan 24, 2025
7a329da
configure.ac, Makefile.am: DISTCHECK_FLAGS*: inherit CFLAGS/CXXFLAGS …
jimklimov Jan 24, 2025
1fa9a11
Makefile.am: only proceed to "make memcheck" if we HAVE_VALGRIND
jimklimov Jan 24, 2025
513411d
tests/Makefile.am: refactor "memcheck" recipe to be usable stand-alon…
jimklimov Jan 24, 2025
ea2789d
ci_build.sh: hot-fix issue #2782 on OmniOS
jimklimov Jan 24, 2025
5012f42
Makefile.am: separate meaning of memcheck vs. distcheck-valgrind targets
jimklimov Jan 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ endif
# tweak paths not using ${prefix} so `make distcheck` fails for it as
# it does not play with a `DESTDIR` either.

DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto --with-pynut=app --with-nut_monitor=force
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto --with-pynut=app --with-nut_monitor=force
DISTCHECK_LIGHT_MAN_FLAGS = --with-all=auto --with-ssl=auto --with-doc=man --with-pynut=app --with-nut_monitor=force
DISTCHECK_VALGRIND_FLAGS = --with-all=auto --with-ssl=auto --with-doc=skip --with-valgrind CXXFLAGS='$(CXXFLAGS) -g' CFLAGS='$(CFLAGS) -g' --with-pynut=app --with-nut_monitor=force
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto --with-pynut=app --with-nut_monitor=force CXXFLAGS='@NUT_CONFIG_CXXFLAGS@' CFLAGS='@NUT_CONFIG_CFLAGS@' CPPFLAGS='@NUT_CONFIG_CPPFLAGS@' LDFLAGS='@NUT_CONFIG_LDFLAGS@'
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto --with-pynut=app --with-nut_monitor=force CXXFLAGS='@NUT_CONFIG_CXXFLAGS@' CFLAGS='@NUT_CONFIG_CFLAGS@' CPPFLAGS='@NUT_CONFIG_CPPFLAGS@' LDFLAGS='@NUT_CONFIG_LDFLAGS@'
DISTCHECK_LIGHT_MAN_FLAGS = --with-all=auto --with-ssl=auto --with-doc=man --with-pynut=app --with-nut_monitor=force CXXFLAGS='@NUT_CONFIG_CXXFLAGS@' CFLAGS='@NUT_CONFIG_CFLAGS@' CPPFLAGS='@NUT_CONFIG_CPPFLAGS@' LDFLAGS='@NUT_CONFIG_LDFLAGS@'
DISTCHECK_VALGRIND_FLAGS = --with-all=auto --with-ssl=auto --with-doc=skip --with-valgrind CXXFLAGS='@NUT_CONFIG_CXXFLAGS@ -g' CFLAGS='@NUT_CONFIG_CFLAGS@ -g' CPPFLAGS='@NUT_CONFIG_CPPFLAGS@' LDFLAGS='@NUT_CONFIG_LDFLAGS@' --with-pynut=app --with-nut_monitor=force

# Note: this rule uses envvar DISTCHECK_FLAGS expanded at run-time
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
PKG_CONFIG_PATH='@PKG_CONFIG_PATH@' \
--with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \
--with-systemdsystempresetdir='$${prefix}/usr/lib/systemd/system-preset' \
--with-systemdshutdowndir='$${prefix}/lib/systemd/system-shutdown' \
Expand All @@ -90,15 +91,26 @@ DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
# that is meaningful for sub-make program (gets stripped away
# otherwise and breaks custom distchecks).
distcheck-light:
+prefix='$${prefix}'; $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_CONFIGURE_FLAGS="$(DISTCHECK_CONFIGURE_FLAGS)" DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
+prefix='$${prefix}'; $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck

distcheck-light-man:
+prefix='$${prefix}'; $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_CONFIGURE_FLAGS="$(DISTCHECK_CONFIGURE_FLAGS)" DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_MAN_FLAGS)" distcheck
+prefix='$${prefix}'; $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_MAN_FLAGS)" distcheck

if HAVE_VALGRIND
# Make the check in current build, if possible
memcheck:
@echo "See also scripts/valgrind in NUT sources for a helper tool"
+@cd $(builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) -s $@

# Make a distcheck (and check in particular) with enabled valgrind and debug info
distcheck-valgrind:
@echo "See also scripts/valgrind in NUT sources for a helper tool"
+prefix='$${prefix}'; $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck
else !HAVE_VALGRIND
memcheck distcheck-valgrind:
@echo "See also scripts/valgrind in NUT sources for a helper tool"
+prefix='$${prefix}'; $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_CONFIGURE_FLAGS="$(DISTCHECK_CONFIGURE_FLAGS)" DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck
@echo "SKIPPED $@ : valgrind was not detected on this system by configure script" >&2
endif !HAVE_VALGRIND

# 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
Loading
Loading