From b2f225d6bff8201874bdc6fdcb8dff1bcf1b814f Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 23 Oct 2024 06:33:18 +0000 Subject: Consolidate and add files to clean target variables To increase the consistency of how automatic clean targets run, define the variables together without +=, default to MOSTLYCLEANFILES when there is no need for different levels or add more clean levels to match other subdirectories, add more files that are built, remove duplication, and cleanup. Do the same for EXTRA_DIST where it is equally messy. * backends/Makefile.am: add more objects to clean, improve spacing. * debuginfod/Makefile.am: Likewise, and remove duplicates. * lib/Makefile.am: improve spacing. * libasm/Makefile.am: add more objects to clean, split similar to debuginfod. * libcpu/Makefile.am: use normal =, add more objects to clean. * libdw/Makefile.am: add more objects to clean, split similar to debuginfod. * libdwelf/Makefile.am: add more objects to clean, use lowest clean level. * libdwfl/Makefile.am: Likewise. * libebl/Makefile.am: add more objects to clean. * libelf/Makefile.am: add more objects to clean, split similar to debuginfod. * src/Makefile.am: consolidate including EXTRA_DIST, split clean levels, define with normal =, define with variables. * tests/Makefile.am: Likewise, but not including EXTRA_DIST. Signed-off-by: Michael Pratt --- tests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 6dc255a9..44cbb825 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -874,7 +874,6 @@ declfiles_LDADD = $(libdw) # Don't include any -I CPPFLAGS. Except when we install our own elf.h. # For the gelf test we do want our own libelf.h, but nothing else. BUILT_SOURCES = libelf.h -CLEANFILES += libelf.h libelf.h: $(top_srcdir)/libelf/libelf.h ln -s $< $@ if !INSTALL_ELFH @@ -888,7 +887,8 @@ system_elf_libelf_test_LDADD = $(libelf) system_elf_gelf_test_LDADD = $(libelf) # A lock file used to make sure only one test dumps core at a time -CLEANFILES += core-dump-backtrace.lock +MOSTLYCLEANFILES = core-dump-backtrace.lock +CLEANFILES = $(BUILT_SOURCES) if GCOV check: check-am coverage -- cgit v1.2.3