Since b2f225d6bff8 ("Consolidate and add files to clean target variables")
autoreconf (automake) produces these warnings:
debuginfod/Makefile.am:130: warning: CLEANFILES multiply defined in condition
TRUE ...
config/eu.am:138: ... 'CLEANFILES' previously defined here
debuginfod/Makefile.am:32: 'config/eu.am' included from here
libasm/Makefile.am:91: warning: CLEANFILES multiply defined in condition TRUE
...
config/eu.am:138: ... 'CLEANFILES' previously defined here
libasm/Makefile.am:30: 'config/eu.am' included from here
libcpu/Makefile.am:105: warning: CLEANFILES multiply defined in condition TRUE
...
config/eu.am:138: ... 'CLEANFILES' previously defined here
libcpu/Makefile.am:30: 'config/eu.am' included from here
libdw/Makefile.am:156: warning: CLEANFILES multiply defined in condition TRUE
...
config/eu.am:138: ... 'CLEANFILES' previously defined here
libdw/Makefile.am:30: 'config/eu.am' included from here
libelf/Makefile.am:142: warning: CLEANFILES multiply defined in condition TRUE
...
config/eu.am:138: ... 'CLEANFILES' previously defined here
libelf/Makefile.am:30: 'config/eu.am' included from here
src/Makefile.am:47: warning: CLEANFILES multiply defined in condition TRUE ...
config/eu.am:138: ... 'CLEANFILES' previously defined here
src/Makefile.am:19: 'config/eu.am' included from here
tests/Makefile.am:891: warning: CLEANFILES multiply defined in condition TRUE
...
config/eu.am:138: ... 'CLEANFILES' previously defined here
tests/Makefile.am:19: 'config/eu.am' included from here
This is because config/eu.am defines a default CLEANFILES. So those
Makefile.am files should add to CLEANFILES with += instead of
redefining CLEANFILES with =.
* debuginfod/Makefile.am (CLEANFILES): Use +=.
* libasm/Makefile.am (CLEANFILES): Likewise.
* libcpu/Makefile.am (CLEANFILES): Likewise.
* libdw/Makefile.am (CLEANFILES): Likewise.
* libelf/Makefile.am (CLEANFILES): Likewise.
* src/Makefile.am (CLEANFILES): Likewise.
* tests/Makefile.am (CLEANFILES): Likewise.
Signed-off-by: Mark Wielaard <[email protected]>
---
debuginfod/Makefile.am | 2 +-
libasm/Makefile.am | 2 +-
libcpu/Makefile.am | 2 +-
libdw/Makefile.am | 2 +-
libelf/Makefile.am | 2 +-
src/Makefile.am | 2 +-
tests/Makefile.am | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am
index 45b5339f488c..1c35ae77c996 100644
--- a/debuginfod/Makefile.am
+++ b/debuginfod/Makefile.am
@@ -127,7 +127,7 @@ endif
EXTRA_DIST = libdebuginfod.map
MOSTLYCLEANFILES = $(am_libdebuginfod_a_OBJECTS)
$(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME)
-CLEANFILES = libdebuginfod.so
+CLEANFILES += libdebuginfod.so
# automake std-options override: arrange to pass LD_LIBRARY_PATH
installcheck-binPROGRAMS: $(bin_PROGRAMS)
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index 324fd095a783..89650e675570 100644
--- a/libasm/Makefile.am
+++ b/libasm/Makefile.am
@@ -88,4 +88,4 @@ noinst_HEADERS = libasmP.h symbolhash.h
EXTRA_DIST = libasm.map
MOSTLYCLEANFILES = $(am_libasm_a_OBJECTS) $(am_libasm_pic_a_OBJECTS)
libasm.so.$(VERSION)
-CLEANFILES = libasm.so
+CLEANFILES += libasm.so
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index 3283523781c0..c70b988f7e48 100644
--- a/libcpu/Makefile.am
+++ b/libcpu/Makefile.am
@@ -102,5 +102,5 @@ bpf_disasm_CFLAGS = -Wno-format-nonliteral
EXTRA_DIST = defs/i386
MOSTLYCLEANFILES = $(am_libcpu_a_OBJECTS) $(am_libcpu_pic_a_OBJECTS)
$(i386_gendis_OBJECTS)
-CLEANFILES = $(foreach P,i386 x86_64,$P_defs $P.mnemonics)
+CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics)
MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_defs $P_dis.h $P_parse.h)
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index 62f4359e4c09..42b18ce23e85 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -153,5 +153,5 @@ noinst_HEADERS = libdwP.h memory-access.h
dwarf_abbrev_hash.h \
EXTRA_DIST = libdw.map
MOSTLYCLEANFILES = $(am_libdw_a_OBJECTS) $(am_libdw_pic_a_OBJECTS)
libdw.so.$(VERSION)
-CLEANFILES = libdw.so
+CLEANFILES += libdw.so
MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index e91bcd6e9ba1..603f797a3aa2 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -139,4 +139,4 @@ uninstall: uninstall-am
EXTRA_DIST = libelf.map
MOSTLYCLEANFILES = $(am_libelf_a_OBJECTS) $(am_libelf_pic_a_OBJECTS)
libelf.so.$(VERSION)
-CLEANFILES = libelf.so
+CLEANFILES += libelf.so
diff --git a/src/Makefile.am b/src/Makefile.am
index 97a0c61aac59..4221d54e4e77 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,7 +44,7 @@ bin_SCRIPTS = make-debug-archive
EXTRA_DIST = arlib.h debugpred.h make-debug-archive.in
MOSTLYCLEANFILES = *.gconv
-CLEANFILES = $(bin_SCRIPTS)
+CLEANFILES += $(bin_SCRIPTS)
if BUILD_STATIC
libasm = ../libasm/libasm.a
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 44cbb8258e70..eed71df0b65a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -888,7 +888,7 @@ system_elf_gelf_test_LDADD = $(libelf)
# A lock file used to make sure only one test dumps core at a time
MOSTLYCLEANFILES = core-dump-backtrace.lock
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES += $(BUILT_SOURCES)
if GCOV
check: check-am coverage
--
2.47.0