diff --git a/Makefile.am b/Makefile.am index 4be88d70a9..93ced17faf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,133 +1,134 @@ # # Copyright 2003-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk + # This directory must be same as in configure.ac's AC_CONFIG_MACRO_DIR ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = CONTRIBUTING.md \ GNUmakefile \ INSTALL.md \ README.markdown \ autogen.sh \ m4/CC_CHECK_LDFLAGS.m4 \ m4/CHECK_ENUM_VALUE.m4 \ m4/REQUIRE_HEADER.m4 \ m4/version.m4 DISTCLEANFILES = config.status -MAINTAINERCLEANFILES = Makefile.in \ - aclocal.m4 \ +MAINTAINERCLEANFILES += aclocal.m4 \ config.guess \ config.sub \ configure \ depcomp \ install-sh \ ltmain.sh \ missing \ py-compile \ test-driver # Don't try to install files outside build directory for "make distcheck". AM_DISTCHECK_CONFIGURE_FLAGS = --prefix="$$dc_install_base/usr" \ --sysconfdir="$$dc_install_base/etc" \ --with-initdir="$$dc_install_base/etc/init.d" \ --with-ocfdir="$$dc_install_base/usr/lib/ocf" \ --with-systemdsystemunitdir="$$dc_install_base$(systemdsystemunitdir)" # Only these will get built with a plain "make" CORE = include \ lib \ daemons \ tools \ xml \ po \ python \ cts \ rpm SUBDIRS = $(CORE) \ agents \ devel \ doc \ etc \ maint \ tests doc_DATA = README.markdown \ COPYING licensedir = $(docdir)/licenses/ dist_license_DATA = $(wildcard licenses/*) # Directories that should be created on install and removed on uninstall ## owned by root:haclient, mode 0750 ROOT_DIRS = $(PACEMAKER_CONFIG_DIR) ## owned by hacluster:haclient, mode 0750 DAEMON_R_DIRS = $(CRM_CONFIG_DIR) \ $(CRM_CORE_DIR) \ $(CRM_BLACKBOX_DIR) ## owned by hacluster:haclient, mode 0770 DAEMON_RW_DIRS = $(CRM_BUNDLE_DIR) \ $(CRM_LOG_DIR) .PHONY: core core: @echo "Building only core components and tests: $(CORE)" @for subdir in $(CORE); do \ echo "Building $$subdir"; \ $(MAKE) $(AM_MAKEFLAGS) -C $$subdir all || exit 1; \ done .PHONY: core-clean core-clean: @echo "Cleaning only core components and tests: $(CORE)" @for subdir in $(CORE); do \ echo "Cleaning $$subdir"; \ $(MAKE) $(AM_MAKEFLAGS) -C $$subdir clean || exit 1; \ done .PHONY: install-exec-local install-exec-local: for DIR in $(ROOT_DIRS) $(DAEMON_R_DIRS); do \ $(INSTALL) -d -m 750 "$(DESTDIR)/$$DIR"; \ done for DIR in $(DAEMON_RW_DIRS); do \ $(INSTALL) -d -m 770 "$(DESTDIR)/$$DIR"; \ done -for DIR in $(ROOT_DIRS); do \ chgrp $(CRM_DAEMON_GROUP) "$(DESTDIR)/$$DIR"; \ done -for DIR in $(DAEMON_R_DIRS) $(DAEMON_RW_DIRS); do \ chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) "$(DESTDIR)/$$DIR"; \ done # Remove created directories only if they're empty .PHONY: uninstall-hook uninstall-hook: -for DIR in $(ROOT_DIRS) $(DAEMON_R_DIRS) $(DAEMON_RW_DIRS); do \ rmdir "$(DESTDIR)/$$DIR"; \ done .PHONY: clean-generic clean-generic: -rm -f *.tar.bz2 *.sed PACKAGE ?= pacemaker .PHONY: clean-local clean-local: -rm -f $(builddir)/$(PACKAGE)-*.tar.gz -if [ "x$(top_srcdir)" != "x$(top_builddir)" ]; then \ rm -rf $(top_builddir)/python; \ fi .PHONY: distclean-local distclean-local: -rm -rf libltdl autom4te.cache diff --git a/cts/Makefile.am b/cts/Makefile.am index 1f04aaaff7..3e128dfc81 100644 --- a/cts/Makefile.am +++ b/cts/Makefile.am @@ -1,78 +1,77 @@ # # Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/python.mk -MAINTAINERCLEANFILES = Makefile.in - # Test commands and globally applicable test files should be in $(testdir), # and command-specific test data should be in a command-specific subdirectory. testdir = $(datadir)/$(PACKAGE)/tests test_SCRIPTS = cts-attrd \ cts-cli \ cts-exec \ cts-fencing \ cts-lab \ cts-regression \ cts-scheduler \ cts-schemas dist_test_DATA = README.md \ valgrind-pcmk.suppressions clidir = $(testdir)/cli dist_cli_DATA = $(wildcard cli/*.xml cli/*.exp) ctsdir = $(datadir)/$(PACKAGE)/tests/cts cts_SCRIPTS = cts schemasdir = $(testdir)/schemas dist_schemas_DATA = $(wildcard schemas/*/ref/*.ref*) \ $(wildcard schemas/*/ref.err/*.ref.err*) \ $(wildcard schemas/*/xml/*.xml) noinst_SCRIPTS = cluster_test .PHONY: scheduler-list scheduler-list: @for T in "$(srcdir)"/scheduler/xml/*.xml; do \ echo $$(basename $$T .xml); \ done CLEANFILES = $(builddir)/.regression.failed.diff .PHONY: clean-local clean-local: rm -f scheduler/*/*.pe rm -f schemas/*/*.up{,.err} SUBDIRS = benchmark \ scheduler \ support .PHONY: cts-support-install cts-support-install: $(MAKE) $(AM_MAKEFLAGS) -C support cts-support $(builddir)/support/cts-support install .PHONY: cts-support-uninstall cts-support-uninstall: $(MAKE) $(AM_MAKEFLAGS) -C support cts-support $(builddir)/support/cts-support uninstall # Everything listed here is a python script, typically generated from a .in file # (though that is not a requirement). We want to run pylint on all of these # things after they've been built. python_files = cts-attrd \ cts-exec \ cts-fencing \ cts-lab \ cts-regression \ cts-scheduler PYCHECKFILES ?= $(python_files) diff --git a/cts/benchmark/Makefile.am b/cts/benchmark/Makefile.am index 703f18dcf3..abbb66f319 100644 --- a/cts/benchmark/Makefile.am +++ b/cts/benchmark/Makefile.am @@ -1,14 +1,15 @@ # -# Copyright 2001-2023 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk benchdir = $(datadir)/$(PACKAGE)/tests/cts/benchmark dist_bench_DATA = README.benchmark \ control bench_SCRIPTS = clubench diff --git a/cts/scheduler/Makefile.am b/cts/scheduler/Makefile.am index aed7714718..24d5a12b8d 100644 --- a/cts/scheduler/Makefile.am +++ b/cts/scheduler/Makefile.am @@ -1,24 +1,25 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk pedir = $(datadir)/$(PACKAGE)/tests/scheduler .PHONY: list list: @for T in "$(srcdir)"/xml/*.xml; do \ echo $$(basename $$T .xml); \ done SUBDIRS = dot \ exp \ scores \ stderr \ summary \ xml diff --git a/cts/scheduler/dot/Makefile.am b/cts/scheduler/dot/Makefile.am index 62dd075a5b..d10a175931 100644 --- a/cts/scheduler/dot/Makefile.am +++ b/cts/scheduler/dot/Makefile.am @@ -1,12 +1,13 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk dotdir = $(datadir)/$(PACKAGE)/tests/scheduler/dot dist_dot_DATA = $(wildcard *.dot) diff --git a/cts/scheduler/exp/Makefile.am b/cts/scheduler/exp/Makefile.am index bfa19060a0..7f30c115be 100644 --- a/cts/scheduler/exp/Makefile.am +++ b/cts/scheduler/exp/Makefile.am @@ -1,12 +1,13 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk expdir = $(datadir)/$(PACKAGE)/tests/scheduler/exp dist_exp_DATA = $(wildcard *.exp) diff --git a/cts/scheduler/scores/Makefile.am b/cts/scheduler/scores/Makefile.am index ab40629806..7f653227e2 100644 --- a/cts/scheduler/scores/Makefile.am +++ b/cts/scheduler/scores/Makefile.am @@ -1,12 +1,13 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk scoresdir = $(datadir)/$(PACKAGE)/tests/scheduler/scores dist_scores_DATA = $(wildcard *.scores) diff --git a/cts/scheduler/stderr/Makefile.am b/cts/scheduler/stderr/Makefile.am index 5dbac99341..a59053b4e4 100644 --- a/cts/scheduler/stderr/Makefile.am +++ b/cts/scheduler/stderr/Makefile.am @@ -1,12 +1,13 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk scoresdir = $(datadir)/$(PACKAGE)/tests/scheduler/stderr dist_scores_DATA = $(wildcard *.stderr) diff --git a/cts/scheduler/summary/Makefile.am b/cts/scheduler/summary/Makefile.am index f89c904825..951db33707 100644 --- a/cts/scheduler/summary/Makefile.am +++ b/cts/scheduler/summary/Makefile.am @@ -1,12 +1,13 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk summarydir = $(datadir)/$(PACKAGE)/tests/scheduler/summary dist_summary_DATA = $(wildcard *.summary) diff --git a/cts/scheduler/xml/Makefile.am b/cts/scheduler/xml/Makefile.am index 4757fb4549..0f07cc2fed 100644 --- a/cts/scheduler/xml/Makefile.am +++ b/cts/scheduler/xml/Makefile.am @@ -1,12 +1,13 @@ # -# Copyright 2001-2021 the Pacemaker project contributors +# Copyright 2001-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk xmldir = $(datadir)/$(PACKAGE)/tests/scheduler/xml dist_xml_DATA = $(wildcard *.xml) diff --git a/cts/support/Makefile.am b/cts/support/Makefile.am index 8071711a9f..ae39f3e968 100644 --- a/cts/support/Makefile.am +++ b/cts/support/Makefile.am @@ -1,25 +1,24 @@ # # Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/python.mk -MAINTAINERCLEANFILES = Makefile.in - # Commands intended to be run only via other commands halibdir = $(CRM_DAEMON_DIR) dist_halib_SCRIPTS = cts-support ctsdir = $(datadir)/$(PACKAGE)/tests/cts cts_DATA = pacemaker-cts-dummyd@.service dist_cts_DATA = cts.conf cts_SCRIPTS = fence_dummy \ LSBDummy \ pacemaker-cts-dummyd PYCHECKFILES ?= cts-support fence_dummy pacemaker-cts-dummyd diff --git a/daemons/Makefile.am b/daemons/Makefile.am index 30dd17ee6e..3e4c00eba7 100644 --- a/daemons/Makefile.am +++ b/daemons/Makefile.am @@ -1,17 +1,18 @@ # -# Copyright 2018-2023 the Pacemaker project contributors +# Copyright 2018-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk + SUBDIRS = based \ schedulerd \ attrd \ controld \ execd \ fenced \ pacemakerd diff --git a/etc/Makefile.am b/etc/Makefile.am index db0213bbc7..dd6bca2563 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,43 +1,43 @@ # # Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk configdir = @CONFIGDIR@ CONFIGS = crm_mon \ pacemaker if !BUILD_SYSTEMD if BUILD_LSB initdir = $(INITDIR) init_SCRIPTS = init.d/pacemaker endif endif logrotatedir = $(sysconfdir)/logrotate.d logrotate_DATA = logrotate.d/pacemaker EXTRA_DIST = $(foreach f,$(CONFIGS),sysconfig/$(f)) # Don't overwrite user's existing config files .PHONY: install-data-local install-data-local: $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(configdir) $(AM_V_at)for f in $(CONFIGS); do \ dest="$(DESTDIR)$(configdir)/$$f"; \ [ -e "$$dest" ] && dest="$$dest.new"; \ $(INSTALL_DATA) "$(srcdir)/sysconfig/$$f" "$$dest"; \ done .PHONY: uninstall-local uninstall-local: $(AM_V_at)for f in $(CONFIGS); do \ dest="$(DESTDIR)$(configdir)/$$f"; \ rm -f "$$dest" "$$dest.new"; \ done diff --git a/include/Makefile.am b/include/Makefile.am index eb27818a04..f8d27cc807 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,42 +1,43 @@ # # Copyright 2003-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in \ - config.h.in +include $(top_srcdir)/mk/common.mk + +MAINTAINERCLEANFILES += config.h.in noinst_HEADERS = config.h \ crm_internal.h \ doxygen.h \ pacemaker-internal.h \ portability.h \ gettext.h pkginclude_HEADERS = crm_config.h \ pacemaker.h SUBDIRS = crm pcmki # gettext.h is supplied by the gettext project GETTEXT_H ?= $(datadir)/gettext/gettext.h .PHONY: update-gettext update-gettext: @if [ ! -e "$(GETTEXT_H)" ]; then \ echo "$(GETTEXT_H) not found"; \ else \ cp "$(GETTEXT_H)" gettext.h; \ "$(GIT)" diff --quiet gettext.h 2>/dev/null; \ if [ $$? -eq 0 ]; then \ echo "No update needed"; \ else \ "$(GIT)" add gettext.h; \ echo 'Review changes then run:'; \ echo 'git commit -m "Low: NLS: update gettext.h from upstream"'; \ fi \ fi diff --git a/include/crm/Makefile.am b/include/crm/Makefile.am index 47fd80966a..5bdf6cc26c 100644 --- a/include/crm/Makefile.am +++ b/include/crm/Makefile.am @@ -1,32 +1,32 @@ # # Copyright 2004-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm header_HEADERS = cib.h \ cib_compat.h \ cluster.h \ crm.h \ crm_compat.h \ lrmd.h \ lrmd_events.h \ msg_xml.h \ msg_xml_compat.h \ services.h \ stonith-ng.h noinst_HEADERS = $(wildcard *_internal.h) SUBDIRS = common \ pengine \ cib \ fencing \ cluster diff --git a/include/crm/cib/Makefile.am b/include/crm/cib/Makefile.am index 28b2df8666..f258a9e433 100644 --- a/include/crm/cib/Makefile.am +++ b/include/crm/cib/Makefile.am @@ -1,15 +1,16 @@ # -# Copyright 2012-2021 the Pacemaker project contributors +# Copyright 2012-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm/cib noinst_HEADERS = internal.h header_HEADERS = cib_types.h \ util.h diff --git a/include/crm/cluster/Makefile.am b/include/crm/cluster/Makefile.am index 2500a87581..ca92e95f96 100644 --- a/include/crm/cluster/Makefile.am +++ b/include/crm/cluster/Makefile.am @@ -1,15 +1,16 @@ # -# Copyright 2012-2023 the Pacemaker project contributors +# Copyright 2012-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm/cluster noinst_HEADERS = internal.h \ $(wildcard *_internal.h) header_HEADERS = compat.h diff --git a/include/crm/common/Makefile.am b/include/crm/common/Makefile.am index 69d42534be..be06b9217a 100644 --- a/include/crm/common/Makefile.am +++ b/include/crm/common/Makefile.am @@ -1,50 +1,50 @@ # # Copyright 2004-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm/common header_HEADERS = acl.h \ actions.h \ agents.h \ cib.h \ ipc.h \ ipc_controld.h \ ipc_pacemakerd.h \ ipc_schedulerd.h \ iso8601.h \ logging.h \ logging_compat.h \ mainloop.h \ nodes.h \ nvpair.h \ nvpair_compat.h \ options.h \ output.h \ probes.h \ resources.h \ results.h \ results_compat.h \ roles.h \ rules.h \ scheduler.h \ scheduler_types.h \ schemas.h \ scores.h \ scores_compat.h \ strings.h \ util.h \ util_compat.h \ xml.h \ xml_compat.h \ xml_io.h \ xml_names.h noinst_HEADERS = $(wildcard *internal.h) diff --git a/include/crm/fencing/Makefile.am b/include/crm/fencing/Makefile.am index 12b434db9c..bab1d9cc85 100644 --- a/include/crm/fencing/Makefile.am +++ b/include/crm/fencing/Makefile.am @@ -1,13 +1,14 @@ # -# Copyright 2012-2021 the Pacemaker project contributors +# Copyright 2012-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm/fencing noinst_HEADERS = internal.h diff --git a/include/crm/pengine/Makefile.am b/include/crm/pengine/Makefile.am index 52e48240ed..64275be01c 100644 --- a/include/crm/pengine/Makefile.am +++ b/include/crm/pengine/Makefile.am @@ -1,22 +1,23 @@ # # Copyright 2006-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm/pengine noinst_HEADERS = internal.h \ $(wildcard *_internal.h) header_HEADERS = common.h \ complex.h \ pe_types.h \ rules.h \ status.h \ pe_types_compat.h \ rules_compat.h \ status_compat.h diff --git a/include/pcmki/Makefile.am b/include/pcmki/Makefile.am index b9475af13f..45af519432 100644 --- a/include/pcmki/Makefile.am +++ b/include/pcmki/Makefile.am @@ -1,14 +1,14 @@ # -# Copyright 2019-2023 the Pacemaker project contributors +# Copyright 2019-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk noinst_HEADERS = $(wildcard *.h) .PHONY: $(ARCHIVE_VERSION) diff --git a/lib/Makefile.am b/lib/Makefile.am index 493ebaa93c..a1f5fe7585 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,32 +1,33 @@ # # Copyright 2003-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk LIBS = cib \ lrmd \ service \ fencing \ cluster pkgconfig_DATA = $(LIBS:%=pacemaker-%.pc) \ libpacemaker.pc \ pacemaker.pc \ pacemaker-pe_rules.pc \ pacemaker-pe_status.pc EXTRA_DIST = $(pkgconfig_DATA:%=%.in) SUBDIRS = common \ pengine \ cib \ services \ fencing \ lrmd \ cluster \ pacemaker diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am index 1950744ff8..b8c80ff13f 100644 --- a/lib/cib/Makefile.am +++ b/lib/cib/Makefile.am @@ -1,30 +1,29 @@ # # Copyright 2004-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # include $(top_srcdir)/mk/common.mk ## libraries lib_LTLIBRARIES = libcib.la ## Library sources (*must* use += format for bumplibs) libcib_la_SOURCES = cib_attrs.c libcib_la_SOURCES += cib_client.c libcib_la_SOURCES += cib_file.c libcib_la_SOURCES += cib_native.c libcib_la_SOURCES += cib_ops.c libcib_la_SOURCES += cib_remote.c libcib_la_SOURCES += cib_utils.c libcib_la_LDFLAGS = -version-info 33:0:6 -libcib_la_CPPFLAGS = $(AM_CPPFLAGS) +libcib_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB) libcib_la_CFLAGS = $(CFLAGS_HARDENED_LIB) -libcib_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB) libcib_la_LIBADD = $(top_builddir)/lib/pengine/libpe_rules.la \ $(top_builddir)/lib/common/libcrmcommon.la diff --git a/lib/cluster/tests/Makefile.am b/lib/cluster/tests/Makefile.am index f4f5658a54..8b79476371 100644 --- a/lib/cluster/tests/Makefile.am +++ b/lib/cluster/tests/Makefile.am @@ -1,12 +1,14 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk + SUBDIRS = \ cluster \ cpg diff --git a/lib/cluster/tests/cluster/Makefile.am b/lib/cluster/tests/cluster/Makefile.am index 072a4ee0f5..64d5e99cfe 100644 --- a/lib/cluster/tests/cluster/Makefile.am +++ b/lib/cluster/tests/cluster/Makefile.am @@ -1,18 +1,19 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/cluster/libcrmcluster.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_cluster_set_destroy_fn_test TESTS = $(check_PROGRAMS) diff --git a/lib/cluster/tests/cpg/Makefile.am b/lib/cluster/tests/cpg/Makefile.am index 625f943144..3ff4fecdeb 100644 --- a/lib/cluster/tests/cpg/Makefile.am +++ b/lib/cluster/tests/cpg/Makefile.am @@ -1,19 +1,20 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/cluster/libcrmcluster.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_cpg_set_confchg_fn_test \ pcmk_cpg_set_deliver_fn_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/Makefile.am b/lib/common/tests/Makefile.am index b6a61136d5..e4898a5a21 100644 --- a/lib/common/tests/Makefile.am +++ b/lib/common/tests/Makefile.am @@ -1,41 +1,43 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk + SUBDIRS = \ acl \ actions \ agents \ cmdline \ digest \ flags \ health \ io \ iso8601 \ lists \ messages \ nodes \ nvpair \ options \ output \ patchset \ probes \ resources \ results \ rules \ scheduler \ schemas \ scores \ strings \ utils \ xml \ xpath if SUPPORT_PROCFS SUBDIRS += procfs endif diff --git a/lib/common/tests/acl/Makefile.am b/lib/common/tests/acl/Makefile.am index 19903dbc76..d8b8b06cbe 100644 --- a/lib/common/tests/acl/Makefile.am +++ b/lib/common/tests/acl/Makefile.am @@ -1,20 +1,21 @@ # -# Copyright 2021-2023 the Pacemaker project contributors +# Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__is_user_in_group_test \ pcmk_acl_required_test \ xml_acl_denied_test \ xml_acl_enabled_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/actions/Makefile.am b/lib/common/tests/actions/Makefile.am index 0dfe52194e..4f30585a7d 100644 --- a/lib/common/tests/actions/Makefile.am +++ b/lib/common/tests/actions/Makefile.am @@ -1,16 +1,17 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = parse_op_key_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/agents/Makefile.am b/lib/common/tests/agents/Makefile.am index b3837d734f..ed30aaffad 100644 --- a/lib/common/tests/agents/Makefile.am +++ b/lib/common/tests/agents/Makefile.am @@ -1,20 +1,21 @@ # -# Copyright 2020-2023 the Pacemaker project contributors +# Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = crm_generate_ra_key_test \ crm_parse_agent_spec_test \ pcmk__effective_rc_test \ pcmk_get_ra_caps_test \ pcmk_stonith_param_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/cmdline/Makefile.am b/lib/common/tests/cmdline/Makefile.am index 792425b9f8..c4c174a3c6 100644 --- a/lib/common/tests/cmdline/Makefile.am +++ b/lib/common/tests/cmdline/Makefile.am @@ -1,18 +1,19 @@ # -# Copyright 2020-2023 the Pacemaker project contributors +# Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__cmdline_preproc_test \ pcmk__new_common_args_test \ pcmk__quote_cmdline_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/digest/Makefile.am b/lib/common/tests/digest/Makefile.am index ad1d9306e8..223a5053d3 100644 --- a/lib/common/tests/digest/Makefile.am +++ b/lib/common/tests/digest/Makefile.am @@ -1,16 +1,17 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = crm_md5sum_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/flags/Makefile.am b/lib/common/tests/flags/Makefile.am index 22a101ab1b..6af5dd3213 100644 --- a/lib/common/tests/flags/Makefile.am +++ b/lib/common/tests/flags/Makefile.am @@ -1,19 +1,20 @@ # -# Copyright 2020-2023 the Pacemaker project contributors +# Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__clear_flags_as_test \ pcmk__set_flags_as_test \ pcmk_all_flags_set_test \ pcmk_any_flags_set_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/health/Makefile.am b/lib/common/tests/health/Makefile.am index ad2a2dad1f..ee02f7e2e8 100644 --- a/lib/common/tests/health/Makefile.am +++ b/lib/common/tests/health/Makefile.am @@ -1,17 +1,18 @@ # -# Copyright 2022 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__parse_health_strategy_test \ pcmk__validate_health_strategy_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/io/Makefile.am b/lib/common/tests/io/Makefile.am index f7519d8f3f..096466a229 100644 --- a/lib/common/tests/io/Makefile.am +++ b/lib/common/tests/io/Makefile.am @@ -1,17 +1,18 @@ # -# Copyright 2020-2023 the Pacemaker project contributors +# Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__full_path_test \ pcmk__get_tmpdir_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/iso8601/Makefile.am b/lib/common/tests/iso8601/Makefile.am index c57afef52f..eeef170445 100644 --- a/lib/common/tests/iso8601/Makefile.am +++ b/lib/common/tests/iso8601/Makefile.am @@ -1,22 +1,23 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = crm_time_add_days_test \ crm_time_add_years_test \ crm_time_parse_duration_test \ pcmk__add_time_from_xml_test \ pcmk__readable_interval_test \ pcmk__set_time_if_earlier_test \ pcmk__time_format_hr_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/lists/Makefile.am b/lib/common/tests/lists/Makefile.am index 0fa1e153bd..519ee82c41 100644 --- a/lib/common/tests/lists/Makefile.am +++ b/lib/common/tests/lists/Makefile.am @@ -1,19 +1,20 @@ # -# Copyright 2022-2023 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__list_of_1_test \ pcmk__list_of_multiple_test \ pcmk__subtract_lists_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/messages/Makefile.am b/lib/common/tests/messages/Makefile.am index c6b387fdda..2b4182ddf8 100644 --- a/lib/common/tests/messages/Makefile.am +++ b/lib/common/tests/messages/Makefile.am @@ -1,17 +1,18 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__new_message_as_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/nodes/Makefile.am b/lib/common/tests/nodes/Makefile.am index 6c4964e1d0..a7884658d1 100644 --- a/lib/common/tests/nodes/Makefile.am +++ b/lib/common/tests/nodes/Makefile.am @@ -1,24 +1,25 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__find_node_in_list_test \ pcmk__xe_add_node_test \ pcmk_cib_node_shutdown_test \ pcmk_foreach_active_resource_test \ pcmk_node_is_clean_test \ pcmk_node_is_in_maintenance_test \ pcmk_node_is_online_test \ pcmk_node_is_pending_test \ pcmk_node_is_shutting_down_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/nvpair/Makefile.am b/lib/common/tests/nvpair/Makefile.am index 59d3788242..935460199d 100644 --- a/lib/common/tests/nvpair/Makefile.am +++ b/lib/common/tests/nvpair/Makefile.am @@ -1,22 +1,23 @@ # # Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = crm_meta_name_test \ crm_meta_value_test \ pcmk__xe_attr_is_true_test \ pcmk__xe_get_bool_attr_test \ pcmk__xe_get_datetime_test \ pcmk__xe_get_flags_test \ pcmk__xe_set_bool_attr_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/options/Makefile.am b/lib/common/tests/options/Makefile.am index cc1008e587..539ace57be 100644 --- a/lib/common/tests/options/Makefile.am +++ b/lib/common/tests/options/Makefile.am @@ -1,18 +1,19 @@ # -# Copyright 2022-2023 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__env_option_test \ pcmk__set_env_option_test \ pcmk__env_option_enabled_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/output/Makefile.am b/lib/common/tests/output/Makefile.am index 30f149463f..0abe4d4683 100644 --- a/lib/common/tests/output/Makefile.am +++ b/lib/common/tests/output/Makefile.am @@ -1,24 +1,25 @@ # -# Copyright 2021-2023 the Pacemaker project contributors +# Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__call_message_test \ pcmk__output_and_clear_error_test \ pcmk__output_free_test \ pcmk__output_new_test \ pcmk__register_format_test \ pcmk__register_formats_test \ pcmk__register_message_test \ pcmk__register_messages_test \ pcmk__unregister_formats_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/patchset/Makefile.am b/lib/common/tests/patchset/Makefile.am index f027a16880..44f76c297b 100644 --- a/lib/common/tests/patchset/Makefile.am +++ b/lib/common/tests/patchset/Makefile.am @@ -1,16 +1,17 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__cib_element_in_patchset_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/probes/Makefile.am b/lib/common/tests/probes/Makefile.am index f5a3fb4f81..5bb3c11914 100644 --- a/lib/common/tests/probes/Makefile.am +++ b/lib/common/tests/probes/Makefile.am @@ -1,18 +1,19 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_is_probe_test \ pcmk_xe_is_probe_test \ pcmk_xe_mask_probe_failure_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/procfs/Makefile.am b/lib/common/tests/procfs/Makefile.am index 75511f5c13..58555f64be 100644 --- a/lib/common/tests/procfs/Makefile.am +++ b/lib/common/tests/procfs/Makefile.am @@ -1,18 +1,19 @@ # -# Copyright 2022 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__procfs_has_pids_false_test \ pcmk__procfs_has_pids_true_test \ pcmk__procfs_pid2path_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/resources/Makefile.am b/lib/common/tests/resources/Makefile.am index 91e29a6f3a..934b985016 100644 --- a/lib/common/tests/resources/Makefile.am +++ b/lib/common/tests/resources/Makefile.am @@ -1,17 +1,18 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_resource_id_test \ pcmk_resource_is_managed_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/results/Makefile.am b/lib/common/tests/results/Makefile.am index a7d566362e..ec02619ebe 100644 --- a/lib/common/tests/results/Makefile.am +++ b/lib/common/tests/results/Makefile.am @@ -1,16 +1,17 @@ # -# Copyright 2021-2023 the Pacemaker project contributors +# Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__results_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/rules/Makefile.am b/lib/common/tests/rules/Makefile.am index 41630371da..0ad54d0cb1 100644 --- a/lib/common/tests/rules/Makefile.am +++ b/lib/common/tests/rules/Makefile.am @@ -1,29 +1,30 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__cmp_by_type_test \ pcmk__evaluate_attr_expression_test \ pcmk__evaluate_date_expression_test \ pcmk__evaluate_date_spec_test \ pcmk__evaluate_condition_test \ pcmk__evaluate_op_expression_test \ pcmk__evaluate_rsc_expression_test \ pcmk__parse_combine_test \ pcmk__parse_comparison_test \ pcmk__parse_source_test \ pcmk__parse_type_test \ pcmk__replace_submatches_test \ pcmk__unpack_duration_test \ pcmk_evaluate_rule_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/scheduler/Makefile.am b/lib/common/tests/scheduler/Makefile.am index 6d5f4f8004..51bde6235e 100644 --- a/lib/common/tests/scheduler/Makefile.am +++ b/lib/common/tests/scheduler/Makefile.am @@ -1,19 +1,20 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_get_dc_test \ pcmk_get_no_quorum_policy_test \ pcmk_has_quorum_test \ pcmk_set_scheduler_cib_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/schemas/Makefile.am b/lib/common/tests/schemas/Makefile.am index 4b6ac2a5a5..4fb825aee5 100644 --- a/lib/common/tests/schemas/Makefile.am +++ b/lib/common/tests/schemas/Makefile.am @@ -1,86 +1,87 @@ # # Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk CFLAGS += -DPCMK__TEST_SCHEMA_DIR='"$(abs_builddir)/schemas"' # Add "_test" to the end of all test program names to simplify .gitignore. # These tests share a schema subdirectory SHARED_SCHEMA_TESTS = pcmk__build_schema_xml_node_test \ pcmk__cmp_schemas_by_name_test \ pcmk__get_schema_test \ pcmk__schema_files_later_than_test \ pcmk__schema_init_test # This test has its own schema directory FIND_X_0_SCHEMA_TEST = pcmk__find_x_0_schema_test check_PROGRAMS = $(SHARED_SCHEMA_TESTS) $(FIND_X_0_SCHEMA_TEST) TESTS = $(check_PROGRAMS) $(SHARED_SCHEMA_TESTS): setup-schema-dir $(FIND_X_0_SCHEMA_TEST): setup-find_x_0-schema-dir # Set up a temporary schemas/ directory containing only some of the full set of # pacemaker schema files. This lets us know exactly how many schemas are present, # allowing us to write tests without having to make changes when new schemas are # added. # # This directory contains the following: # # * upgrade-*.xsl - Required by various schema versions # * pacemaker-[0-9]*.rng - We're only pulling in 15 schemas, which is enough # to get everything through pacemaker-3.0.rng. This # includes 2.10, needed so we can check that versions # are compared as numbers instead of strings. # * other RNG files - This catches everything except the pacemaker-*rng # files. These files are included by the top-level # pacemaker-*rng files, so we need them for tests. # This will glob more than we need, but the extra ones # won't get in the way. LINK_FILES = $(abs_top_builddir)/xml/upgrade-*.xsl ROOT_RNGS = $(shell ls -1v $(abs_top_builddir)/xml/pacemaker-[0-9]*.rng | head -15) INCLUDED_RNGS = $(shell ls -1 $(top_srcdir)/xml/*.rng | grep -v pacemaker-[0-9]) # Most tests share a common, read-only schema directory .PHONY: setup-schema-dir setup-schema-dir: $(MKDIR_P) schemas ( cd schemas ; \ ln -sf $(LINK_FILES) . ; \ for f in $(ROOT_RNGS); do \ ln -sf $$f $$(basename $$f); \ done ; \ for f in $(INCLUDED_RNGS); do \ ln -sf ../$$f $$(basename $$f); \ done ) # pcmk__find_x_0_schema_test moves schema files around, so it needs its # own directory, otherwise other tests run in parallel could fail. .PHONY: setup-find_x_0-schema-dir setup-find_x_0-schema-dir: $(MKDIR_P) schemas/find_x_0 ( cd schemas/find_x_0 ; \ ln -sf $(LINK_FILES) . ; \ for f in $(ROOT_RNGS); do \ ln -sf $$f $$(basename $$f); \ done ; \ for f in $(INCLUDED_RNGS); do \ ln -sf ../$$f $$(basename $$f); \ done ) .PHONY: clean-local clean-local: -rm -rf schemas diff --git a/lib/common/tests/scores/Makefile.am b/lib/common/tests/scores/Makefile.am index 5b9ddfbe57..a0895b181a 100644 --- a/lib/common/tests/scores/Makefile.am +++ b/lib/common/tests/scores/Makefile.am @@ -1,20 +1,21 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__add_scores_test \ pcmk_parse_score_test \ pcmk_readable_score_test \ pcmk_str_is_infinity_test \ pcmk_str_is_minus_infinity_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/strings/Makefile.am b/lib/common/tests/strings/Makefile.am index 439b6bf392..e61f41f51d 100644 --- a/lib/common/tests/strings/Makefile.am +++ b/lib/common/tests/strings/Makefile.am @@ -1,40 +1,41 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = crm_get_msec_test \ crm_is_true_test \ crm_str_to_boolean_test \ pcmk__add_word_test \ pcmk__btoa_test \ pcmk__compress_test \ pcmk__ends_with_test \ pcmk__g_strcat_test \ pcmk__guint_from_hash_test \ pcmk__numeric_strcasecmp_test \ pcmk__parse_ll_range_test \ pcmk__s_test \ pcmk__scan_double_test \ pcmk__scan_ll_test \ pcmk__scan_min_int_test \ pcmk__scan_port_test \ pcmk__starts_with_test \ pcmk__str_any_of_test \ pcmk__str_in_list_test \ pcmk__str_table_dup_test \ pcmk__str_update_test \ pcmk__strcmp_test \ pcmk__strkey_table_test \ pcmk__strikey_table_test \ pcmk__trim_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/utils/Makefile.am b/lib/common/tests/utils/Makefile.am index c4b81c115f..147f6d7b3b 100644 --- a/lib/common/tests/utils/Makefile.am +++ b/lib/common/tests/utils/Makefile.am @@ -1,23 +1,24 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = compare_version_test \ crm_user_lookup_test \ pcmk_daemon_user_test \ pcmk__fail_attr_name_test \ pcmk__failcount_name_test \ pcmk__getpid_s_test \ pcmk__lastfailure_name_test \ pcmk__realloc_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/xml/Makefile.am b/lib/common/tests/xml/Makefile.am index 45dee0884c..94efcac42d 100644 --- a/lib/common/tests/xml/Makefile.am +++ b/lib/common/tests/xml/Makefile.am @@ -1,30 +1,31 @@ # # Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__xc_create_test \ pcmk__xe_copy_attrs_test \ pcmk__xe_first_child_test \ pcmk__xe_foreach_child_test \ pcmk__xe_get_score_test \ pcmk__xe_set_id_test \ pcmk__xe_set_score_test \ pcmk__xe_sort_attrs_test \ pcmk__xml_escape_test \ pcmk__xml_init_test \ pcmk__xml_is_name_char_test \ pcmk__xml_is_name_start_char_test \ pcmk__xml_needs_escape_test \ pcmk__xml_new_doc_test \ pcmk__xml_sanitize_id_test TESTS = $(check_PROGRAMS) diff --git a/lib/common/tests/xpath/Makefile.am b/lib/common/tests/xpath/Makefile.am index d4c504b63b..6fe9adc839 100644 --- a/lib/common/tests/xpath/Makefile.am +++ b/lib/common/tests/xpath/Makefile.am @@ -1,16 +1,17 @@ # -# Copyright 2021-2023 the Pacemaker project contributors +# Copyright 2021-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__xpath_node_id_test TESTS = $(check_PROGRAMS) diff --git a/lib/pacemaker/tests/Makefile.am b/lib/pacemaker/tests/Makefile.am index ad48fdd266..a0db39c182 100644 --- a/lib/pacemaker/tests/Makefile.am +++ b/lib/pacemaker/tests/Makefile.am @@ -1,11 +1,13 @@ # -# Copyright 2020-2023 the Pacemaker project contributors +# Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk + SUBDIRS = pcmk_resource \ pcmk_ticket diff --git a/lib/pacemaker/tests/pcmk_resource/Makefile.am b/lib/pacemaker/tests/pcmk_resource/Makefile.am index bed9a0ed18..b85a0cf8d2 100644 --- a/lib/pacemaker/tests/pcmk_resource/Makefile.am +++ b/lib/pacemaker/tests/pcmk_resource/Makefile.am @@ -1,20 +1,21 @@ # # Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/pacemaker/libpacemaker.la LDADD += $(top_builddir)/lib/cib/libcib.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk_resource_delete_test TESTS = $(check_PROGRAMS) diff --git a/lib/pacemaker/tests/pcmk_ticket/Makefile.am b/lib/pacemaker/tests/pcmk_ticket/Makefile.am index d9660a08ad..ec8aec27b8 100644 --- a/lib/pacemaker/tests/pcmk_ticket/Makefile.am +++ b/lib/pacemaker/tests/pcmk_ticket/Makefile.am @@ -1,27 +1,28 @@ # # Copyright 2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/pacemaker/libpacemaker.la LDADD += $(top_builddir)/lib/cib/libcib.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pcmk__get_ticket_state_test \ pcmk_ticket_constraints_test \ pcmk_ticket_delete_test \ pcmk_ticket_get_attr_test \ pcmk_ticket_info_test \ pcmk_ticket_remove_attr_test \ pcmk_ticket_set_attr_test \ pcmk_ticket_state_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/Makefile.am b/lib/pengine/tests/Makefile.am index 52a0ff6304..7f156e85b7 100644 --- a/lib/pengine/tests/Makefile.am +++ b/lib/pengine/tests/Makefile.am @@ -1,14 +1,15 @@ # # Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in + +include $(top_srcdir)/mk/common.mk SUBDIRS = native \ status \ unpack \ utils diff --git a/lib/pengine/tests/native/Makefile.am b/lib/pengine/tests/native/Makefile.am index 0b5106ea1a..bbd6cc51b8 100644 --- a/lib/pengine/tests/native/Makefile.am +++ b/lib/pengine/tests/native/Makefile.am @@ -1,21 +1,22 @@ # # Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/pengine/libpe_status_test.la AM_TESTS_ENVIRONMENT += PCMK_CTS_CLI_DIR=$(top_srcdir)/cts/cli # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = native_find_rsc_test \ pe_base_name_eq_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/status/Makefile.am b/lib/pengine/tests/status/Makefile.am index f91d150b6d..e95f51a74a 100644 --- a/lib/pengine/tests/status/Makefile.am +++ b/lib/pengine/tests/status/Makefile.am @@ -1,21 +1,22 @@ # # Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/pengine/libpe_status_test.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pe_find_node_any_test \ pe_find_node_id_test \ pe_new_working_set_test \ set_working_set_defaults_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/unpack/Makefile.am b/lib/pengine/tests/unpack/Makefile.am index baa8633984..3d48cf8b50 100644 --- a/lib/pengine/tests/unpack/Makefile.am +++ b/lib/pengine/tests/unpack/Makefile.am @@ -1,18 +1,19 @@ # -# Copyright 2022 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk LDADD += $(top_builddir)/lib/pengine/libpe_status_test.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pe_base_name_end_test TESTS = $(check_PROGRAMS) diff --git a/lib/pengine/tests/utils/Makefile.am b/lib/pengine/tests/utils/Makefile.am index 64421e261f..4f15ae4ef8 100644 --- a/lib/pengine/tests/utils/Makefile.am +++ b/lib/pengine/tests/utils/Makefile.am @@ -1,20 +1,21 @@ # -# Copyright 2022-2023 the Pacemaker project contributors +# Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/tap.mk include $(top_srcdir)/mk/unittest.mk AM_CPPFLAGS += -I$(top_srcdir)/lib/pengine LDADD += $(top_builddir)/lib/pengine/libpe_status_test.la # Add "_test" to the end of all test program names to simplify .gitignore. check_PROGRAMS = pe__cmp_node_name_test \ pe__cmp_rsc_priority_test TESTS = $(check_PROGRAMS) diff --git a/maint/Makefile.am b/maint/Makefile.am index ca9a0392cd..47c29a8c8a 100644 --- a/maint/Makefile.am +++ b/maint/Makefile.am @@ -1,79 +1,80 @@ # -# Copyright 2019-2023 the Pacemaker project contributors +# Copyright 2019-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # # Define release-related variables include $(abs_srcdir)/../mk/release.mk +include $(top_srcdir)/mk/common.mk noinst_SCRIPTS = bumplibs EXTRA_DIST = README # # Change log generation # # Count changes in these directories CHANGELOG_DIRS = ../include \ ../lib \ ../daemons \ ../tools \ ../xml .PHONY: require_last_release require_last_release: @if [ -z "$(CHECKOUT)" ]; then \ echo "This target must be run from a git checkout"; \ exit 1; \ elif ! "$(GIT)" rev-parse $(LAST_RELEASE) >/dev/null 2>&1; then \ echo "LAST_RELEASE must be set to a valid git tag"; \ exit 1; \ fi .PHONY: summary summary: require_last_release @printf "* %s %s <%s> %s\n" "$$(date +'%a %b %d %Y')" \ "$$("$(GIT)" config user.name)" \ "$$("$(GIT)" config user.email)" \ "$(NEXT_RELEASE)" @printf "\055 %d commits with%s\n" \ "$$("$(GIT)" log --pretty=oneline --no-merges \ $(LAST_RELEASE)..HEAD | wc -l)" \ "$$("$(GIT)" diff $(LAST_RELEASE)..HEAD --shortstat \ $(CHANGELOG_DIRS))" .PHONY: changes changes: summary @printf "\n- Features added since $(LAST_RELEASE)\n" @"$(GIT)" log --pretty=format:'%s' --no-merges \ --abbrev-commit $(LAST_RELEASE)..HEAD \ | sed -n -e 's/^ *Feature: */ + /p' | sort -uf @printf "\n- Fixes since $(LAST_RELEASE)\n" @"$(GIT)" log --pretty=format:'%s' --no-merges \ --abbrev-commit $(LAST_RELEASE)..HEAD \ | sed -n -e 's/^ *\(Fix\|High\|Bug\): */ + /p' | sed \ -e 's/\(cib\|pacemaker-based\|based\):/CIB:/' \ -e 's/\(lrmd\|pacemaker-execd\|execd\):/executor:/' \ -e 's/\(crmd\|pacemaker-controld\|controld\):/controller:/' \ -e 's/\(Fencing\|stonithd?\|pacemaker-fenced\|fenced\):/fencing:/' \ -e 's/\(PE\|pengine\|pacemaker-schedulerd\|schedulerd\):/scheduler:/' \ | sort -uf @printf "\n- Public API changes since $(LAST_RELEASE)\n" @"$(GIT)" log --pretty=format:'%s' --no-merges \ --abbrev-commit $(LAST_RELEASE)..HEAD \ | sed -n -e 's/^ *API: */ + /p' | sort -uf .PHONY: changelog changelog: require_last_release @printf "%s\n\n%s\n" \ "$$($(MAKE) $(AM_MAKEFLAGS) changes \ | grep -v 'make\(\[[0-9]*\]\)\?:')" \ "$$(cat ../ChangeLog)" > ../ChangeLog .PHONY: authors authors: require_last_release "$(GIT)" log $(LAST_RELEASE)..$(COMMIT) --format='%an' | sort -u diff --git a/mk/unittest.mk b/mk/unittest.mk index f563ea3fd4..53e20fb68b 100644 --- a/mk/unittest.mk +++ b/mk/unittest.mk @@ -1,28 +1,26 @@ # # Copyright 2022-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -AM_CPPFLAGS = -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/lib/common +AM_CPPFLAGS += -I$(top_srcdir)/lib/common AM_CFLAGS = -DPCMK__UNIT_TESTING # Add -fno-builtin and -fno-inline to allow mocking realloc. AM_CFLAGS += -fno-builtin AM_CFLAGS += -fno-inline AM_LDFLAGS = $(LDFLAGS_WRAP) LDADD = $(top_builddir)/lib/common/libcrmcommon_test.la if BUILD_COVERAGE LDADD += -lgcov endif LDADD += -lcmocka # When -fno-builtin is used, -lm also needs to be added. See the comments in # lib/common/Makefile.am for libcrmcommon_test_la_CFLAGS. LDADD += -lm diff --git a/python/Makefile.am b/python/Makefile.am index 558c2e91f9..7d2508434f 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,26 +1,25 @@ # # Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk include $(top_srcdir)/mk/python.mk -MAINTAINERCLEANFILES = Makefile.in - EXTRA_DIST = pylintrc SUBDIRS = pacemaker \ tests PYCHECKFILES ?= $(SUBDIRS) .PHONY: check-local check-local: if [ "x$(top_srcdir)" != "x$(top_builddir)" ]; then \ cp -r $(top_srcdir)/python/* $(abs_top_builddir)/python/; \ fi PYTHONPATH=$(top_builddir)/python $(PYTHON) -m unittest discover -v -s $(top_builddir)/python/tests diff --git a/python/pacemaker/Makefile.am b/python/pacemaker/Makefile.am index 99a137ad78..27e6d6888f 100644 --- a/python/pacemaker/Makefile.am +++ b/python/pacemaker/Makefile.am @@ -1,18 +1,18 @@ # # Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk pkgpython_PYTHON = __init__.py \ _library.py \ exitstatus.py nodist_pkgpython_PYTHON = buildoptions.py SUBDIRS = _cts diff --git a/python/pacemaker/_cts/Makefile.am b/python/pacemaker/_cts/Makefile.am index efb00193ca..45997ccea9 100644 --- a/python/pacemaker/_cts/Makefile.am +++ b/python/pacemaker/_cts/Makefile.am @@ -1,16 +1,16 @@ # -# Copyright 2023 the Pacemaker project contributors +# Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk pkgpythondir = $(pythondir)/$(PACKAGE)/_cts pkgpython_PYTHON = $(wildcard *.py) SUBDIRS = tests diff --git a/python/pacemaker/_cts/tests/Makefile.am b/python/pacemaker/_cts/tests/Makefile.am index 0dba74ba40..28ce9908a5 100644 --- a/python/pacemaker/_cts/tests/Makefile.am +++ b/python/pacemaker/_cts/tests/Makefile.am @@ -1,14 +1,14 @@ # -# Copyright 2023 the Pacemaker project contributors +# Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk pkgpythondir = $(pythondir)/$(PACKAGE)/_cts/tests pkgpython_PYTHON = $(wildcard *.py) diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 219812cc5d..b0d46c0e80 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -1,13 +1,13 @@ # -# Copyright 2023 the Pacemaker project contributors +# Copyright 2023-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/mk/common.mk EXTRA_DIST = $(wildcard test_*) \ __init__.py diff --git a/tests/Makefile.am b/tests/Makefile.am index 8601e1ba09..fd68f9ea40 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,22 +1,24 @@ # -# Copyright 2020-2023 the Pacemaker project contributors +# Copyright 2020-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # +include $(top_srcdir)/mk/common.mk + # tap-test is copied from /usr/share/automake-*/tap-driver.sh. EXTRA_DIST = tap-driver.sh \ tap-test \ test-headers.sh .PHONY: check check: check-headers .PHONY: check-headers check-headers: CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CC="$(CC)" \ CXX="$(CXX)" CPPFLAGS="$(CPPFLAGS) -I$(top_builddir)/include" LIBS="$(LIBS)" \ SRCDIR="$(top_srcdir)" sh "$(srcdir)/test-headers.sh"