Skip to content

Commit 1c28ef8

Browse files
authored
Merge pull request #4020 from clumens/makefile-style
Build: Use the += style when setting multi-line variables.
2 parents ca87867 + 8da37c4 commit 1c28ef8

69 files changed

Lines changed: 743 additions & 726 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile.am

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2003-2024 the Pacemaker project contributors
2+
# Copyright 2003-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -12,57 +12,57 @@ include $(top_srcdir)/mk/common.mk
1212
# This directory must be same as in configure.ac's AC_CONFIG_MACRO_DIR
1313
ACLOCAL_AMFLAGS = -I m4
1414

15-
EXTRA_DIST = CONTRIBUTING.md \
16-
GNUmakefile \
17-
INSTALL.md \
18-
README.markdown \
19-
autogen.sh \
20-
m4/CC_CHECK_LDFLAGS.m4 \
21-
m4/CHECK_ENUM_VALUE.m4 \
22-
m4/REQUIRE_HEADER.m4 \
23-
m4/version.m4
15+
EXTRA_DIST = CONTRIBUTING.md
16+
EXTRA_DIST += GNUmakefile
17+
EXTRA_DIST += INSTALL.md
18+
EXTRA_DIST += README.markdown
19+
EXTRA_DIST += autogen.sh
20+
EXTRA_DIST += m4/CC_CHECK_LDFLAGS.m4
21+
EXTRA_DIST += m4/CHECK_ENUM_VALUE.m4
22+
EXTRA_DIST += m4/REQUIRE_HEADER.m4
23+
EXTRA_DIST += m4/version.m4
2424

2525
DISTCLEANFILES = config.status
2626

27-
MAINTAINERCLEANFILES += aclocal.m4 \
28-
config.guess \
29-
config.sub \
30-
configure \
31-
depcomp \
32-
install-sh \
33-
ltmain.sh \
34-
missing \
35-
py-compile \
36-
test-driver
27+
MAINTAINERCLEANFILES += aclocal.m4
28+
MAINTAINERCLEANFILES += config.guess
29+
MAINTAINERCLEANFILES += config.sub
30+
MAINTAINERCLEANFILES += configure
31+
MAINTAINERCLEANFILES += depcomp
32+
MAINTAINERCLEANFILES += install-sh
33+
MAINTAINERCLEANFILES += ltmain.sh
34+
MAINTAINERCLEANFILES += missing
35+
MAINTAINERCLEANFILES += py-compile
36+
MAINTAINERCLEANFILES += test-driver
3737

3838
# Don't try to install files outside build directory for "make distcheck".
39-
AM_DISTCHECK_CONFIGURE_FLAGS = --prefix="$$dc_install_base/usr" \
40-
--sysconfdir="$$dc_install_base/etc" \
41-
--with-initdir="$$dc_install_base/etc/init.d" \
42-
--with-ocfdir="$$dc_install_base/usr/lib/ocf" \
43-
--with-systemdsystemunitdir="$$dc_install_base$(systemdsystemunitdir)"
39+
AM_DISTCHECK_CONFIGURE_FLAGS = --prefix="$$dc_install_base/usr"
40+
AM_DISTCHECK_CONFIGURE_FLAGS += --sysconfdir="$$dc_install_base/etc"
41+
AM_DISTCHECK_CONFIGURE_FLAGS += --with-initdir="$$dc_install_base/etc/init.d"
42+
AM_DISTCHECK_CONFIGURE_FLAGS += --with-ocfdir="$$dc_install_base/usr/lib/ocf"
43+
AM_DISTCHECK_CONFIGURE_FLAGS += --with-systemdsystemunitdir="$$dc_install_base$(systemdsystemunitdir)"
4444

4545
# Only these will get built with a plain "make"
46-
CORE = include \
47-
lib \
48-
daemons \
49-
tools \
50-
xml \
51-
po \
52-
python \
53-
cts \
54-
rpm
55-
56-
SUBDIRS = $(CORE) \
57-
agents \
58-
devel \
59-
doc \
60-
etc \
61-
maint \
62-
tests
63-
64-
doc_DATA = README.markdown \
65-
COPYING
46+
CORE = include
47+
CORE += lib
48+
CORE += daemons
49+
CORE += tools
50+
CORE += xml
51+
CORE += po
52+
CORE += python
53+
CORE += cts
54+
CORE += rpm
55+
56+
SUBDIRS = $(CORE)
57+
SUBDIRS += agents
58+
SUBDIRS += devel
59+
SUBDIRS += doc
60+
SUBDIRS += etc
61+
SUBDIRS += maint
62+
SUBDIRS += tests
63+
64+
doc_DATA = README.markdown
65+
doc_DATA += COPYING
6666

6767
licensedir = $(docdir)/licenses/
6868
dist_license_DATA = $(wildcard licenses/*)
@@ -71,12 +71,12 @@ dist_license_DATA = $(wildcard licenses/*)
7171
## owned by root:haclient, mode 0750
7272
ROOT_DIRS = $(PACEMAKER_CONFIG_DIR)
7373
## owned by hacluster:haclient, mode 0750
74-
DAEMON_R_DIRS = $(CRM_CONFIG_DIR) \
75-
$(CRM_CORE_DIR) \
76-
$(CRM_BLACKBOX_DIR)
74+
DAEMON_R_DIRS = $(CRM_CONFIG_DIR)
75+
DAEMON_R_DIRS += $(CRM_CORE_DIR)
76+
DAEMON_R_DIRS += $(CRM_BLACKBOX_DIR)
7777
## owned by hacluster:haclient, mode 0770
78-
DAEMON_RW_DIRS = $(CRM_BUNDLE_DIR) \
79-
$(CRM_LOG_DIR)
78+
DAEMON_RW_DIRS = $(CRM_BUNDLE_DIR)
79+
DAEMON_RW_DIRS += $(CRM_LOG_DIR)
8080

8181
.PHONY: core
8282
core:

agents/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
include $(top_srcdir)/mk/common.mk
1111

12-
SUBDIRS = alerts \
13-
ocf \
14-
stonith
12+
SUBDIRS = alerts
13+
SUBDIRS += ocf
14+
SUBDIRS += stonith

agents/ocf/Makefile.am

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2008-2024 the Pacemaker project contributors
2+
# Copyright 2008-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -11,26 +11,29 @@ include $(top_srcdir)/mk/common.mk
1111
include $(top_srcdir)/mk/man.mk
1212

1313
ocfdir = @OCF_RA_INSTALL_DIR@/pacemaker
14-
dist_ocf_SCRIPTS = attribute \
15-
controld \
16-
Dummy \
17-
HealthCPU \
18-
HealthIOWait \
19-
ping \
20-
remote \
21-
Stateful
22-
ocf_SCRIPTS = ClusterMon \
23-
HealthSMART \
24-
ifspeed \
25-
SysInfo
14+
15+
dist_ocf_SCRIPTS = attribute
16+
dist_ocf_SCRIPTS += controld
17+
dist_ocf_SCRIPTS += Dummy
18+
dist_ocf_SCRIPTS += HealthCPU
19+
dist_ocf_SCRIPTS += HealthIOWait
20+
dist_ocf_SCRIPTS += ping
21+
dist_ocf_SCRIPTS += remote
22+
dist_ocf_SCRIPTS += Stateful
23+
24+
ocf_SCRIPTS = ClusterMon
25+
ocf_SCRIPTS += HealthSMART
26+
ocf_SCRIPTS += ifspeed
27+
ocf_SCRIPTS += SysInfo
2628

2729
if BUILD_XML_HELP
2830

29-
man7_MANS = $(ocf_SCRIPTS:%=ocf_pacemaker_%.7) \
30-
$(dist_ocf_SCRIPTS:%=ocf_pacemaker_%.7)
31-
DBOOK_OPTS = --stringparam command.prefix ocf_pacemaker_ \
32-
--stringparam variable.prefix OCF_RESKEY_ \
33-
--param man.vol 7
31+
man7_MANS = $(ocf_SCRIPTS:%=ocf_pacemaker_%.7)
32+
man7_MANS += $(dist_ocf_SCRIPTS:%=ocf_pacemaker_%.7)
33+
34+
DBOOK_OPTS = --stringparam command.prefix ocf_pacemaker_
35+
DBOOK_OPTS += --stringparam variable.prefix OCF_RESKEY_
36+
DBOOK_OPTS += --param man.vol 7
3437

3538
ocf_pacemaker_%.xml: %
3639
$(AM_V_GEN)OCF_FUNCTIONS=/dev/null OCF_ROOT=$(PCMK_OCF_ROOT) $(abs_builddir)/$< meta-data > $@
@@ -52,6 +55,6 @@ validate: all
5255
| xmllint --noout --relaxng $(RNG) - || break; \
5356
done
5457

55-
CLEANFILES = $(man7_MANS) \
56-
$(ocf_SCRIPTS:%=%.xml) \
57-
$(dist_ocf_SCRIPTS:%=%.xml)
58+
CLEANFILES = $(man7_MANS)
59+
CLEANFILES += $(ocf_SCRIPTS:%=%.xml)
60+
CLEANFILES += $(dist_ocf_SCRIPTS:%=%.xml)

agents/stonith/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2003-2023 the Pacemaker project contributors
2+
# Copyright 2003-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -16,5 +16,5 @@ if BUILD_LHA_SUPPORT
1616
sbin_SCRIPTS += fence_legacy
1717
endif
1818

19-
CLEANFILES = $(man7_MANS) \
20-
$(man8_MANS)
19+
CLEANFILES = $(man7_MANS)
20+
CLEANFILES += $(man8_MANS)

cts/Makefile.am

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2001-2025 the Pacemaker project contributors
2+
# Copyright 2001-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -13,24 +13,26 @@ include $(top_srcdir)/mk/python.mk
1313
# Test commands and globally applicable test files should be in $(testdir),
1414
# and command-specific test data should be in a command-specific subdirectory.
1515
testdir = $(datadir)/$(PACKAGE)/tests
16-
test_SCRIPTS = cts-attrd \
17-
cts-cli \
18-
cts-exec \
19-
cts-fencing \
20-
cts-lab \
21-
cts-regression \
22-
cts-scheduler \
23-
cts-schemas
24-
dist_test_DATA = README.md \
25-
valgrind-pcmk.suppressions
16+
17+
test_SCRIPTS = cts-attrd
18+
test_SCRIPTS += cts-cli
19+
test_SCRIPTS += cts-exec
20+
test_SCRIPTS += cts-fencing
21+
test_SCRIPTS += cts-lab
22+
test_SCRIPTS += cts-regression
23+
test_SCRIPTS += cts-scheduler
24+
test_SCRIPTS += cts-schemas
25+
26+
dist_test_DATA = README.md
27+
dist_test_DATA += valgrind-pcmk.suppressions
2628

2729
clidir = $(testdir)/cli
2830
dist_cli_DATA = $(wildcard cli/*.xml cli/*.exp)
2931

3032
schemasdir = $(testdir)/schemas
31-
dist_schemas_DATA = $(wildcard schemas/*/ref/*.ref*) \
32-
$(wildcard schemas/*/ref.err/*.ref.err*) \
33-
$(wildcard schemas/*/xml/*.xml)
33+
dist_schemas_DATA = $(wildcard schemas/*/ref/*.ref*)
34+
dist_schemas_DATA += $(wildcard schemas/*/ref.err/*.ref.err*)
35+
dist_schemas_DATA += $(wildcard schemas/*/xml/*.xml)
3436

3537
noinst_SCRIPTS = cluster_test
3638

@@ -47,9 +49,9 @@ clean-local:
4749
rm -f scheduler/*/*.pe
4850
rm -f schemas/*/*.up{,.err}
4951

50-
SUBDIRS = benchmark \
51-
scheduler \
52-
support
52+
SUBDIRS = benchmark
53+
SUBDIRS += scheduler
54+
SUBDIRS += support
5355

5456
.PHONY: cts-support-install
5557
cts-support-install:
@@ -66,12 +68,12 @@ cts-support-uninstall:
6668
# things after they've been built.
6769
# FIXME: When cts-schemas is converted to python, this can be removed because
6870
# it will duplicate test_SCRIPTS above.
69-
python_files = cts-attrd \
70-
cts-cli \
71-
cts-exec \
72-
cts-fencing \
73-
cts-lab \
74-
cts-regression \
75-
cts-scheduler
71+
python_files = cts-attrd
72+
python_files += cts-cli
73+
python_files += cts-exec
74+
python_files += cts-fencing
75+
python_files += cts-lab
76+
python_files += cts-regression
77+
python_files += cts-scheduler
7678

7779
PYCHECKFILES ?= $(python_files)

cts/benchmark/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2001-2024 the Pacemaker project contributors
2+
# Copyright 2001-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -10,6 +10,6 @@
1010
include $(top_srcdir)/mk/common.mk
1111

1212
benchdir = $(datadir)/$(PACKAGE)/tests/cts/benchmark
13-
dist_bench_DATA = README.benchmark \
14-
control
13+
dist_bench_DATA = README.benchmark
14+
dist_bench_DATA += control
1515
bench_SCRIPTS = clubench

cts/scheduler/Makefile.am

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2001-2024 the Pacemaker project contributors
2+
# Copyright 2001-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -17,9 +17,9 @@ list:
1717
echo $$(basename $$T .xml); \
1818
done
1919

20-
SUBDIRS = dot \
21-
exp \
22-
scores \
23-
stderr \
24-
summary \
25-
xml
20+
SUBDIRS = dot
21+
SUBDIRS += exp
22+
SUBDIRS += scores
23+
SUBDIRS += stderr
24+
SUBDIRS += summary
25+
SUBDIRS += xml

cts/support/Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2021-2024 the Pacemaker project contributors
2+
# Copyright 2021-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -17,8 +17,8 @@ dist_halib_SCRIPTS = cts-support
1717
ctsdir = $(datadir)/$(PACKAGE)/tests/cts
1818
cts_DATA = pacemaker-cts-dummyd@.service
1919
dist_cts_DATA = cts.conf
20-
cts_SCRIPTS = fence_dummy \
21-
LSBDummy \
22-
pacemaker-cts-dummyd
20+
cts_SCRIPTS = fence_dummy
21+
cts_SCRIPTS += LSBDummy
22+
cts_SCRIPTS += pacemaker-cts-dummyd
2323

2424
PYCHECKFILES ?= cts-support fence_dummy pacemaker-cts-dummyd

daemons/Makefile.am

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2018-2024 the Pacemaker project contributors
2+
# Copyright 2018-2026 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -9,10 +9,10 @@
99

1010
include $(top_srcdir)/mk/common.mk
1111

12-
SUBDIRS = based \
13-
schedulerd \
14-
attrd \
15-
controld \
16-
execd \
17-
fenced \
18-
pacemakerd
12+
SUBDIRS = based
13+
SUBDIRS += schedulerd
14+
SUBDIRS += attrd
15+
SUBDIRS += controld
16+
SUBDIRS += execd
17+
SUBDIRS += fenced
18+
SUBDIRS += pacemakerd

0 commit comments

Comments
 (0)