[LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target

Ricardo B. Marliere via ltp
2025-03-27T21:58:46Z

From: Ricardo B. Marlière <rbm@suse.com>

The ac-maintainer-clean target should be responsible to remove all
generated files, in this case from `make autotools`. Add the remaining to
the list and also make sure it happens before any call to other targets in
nested Makefiles, so if there are any errors in them, they happen lastly.

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
include/mk/automake.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/mk/automake.mk b/include/mk/automake.mk
index d96da8313dc8dc4f4d6d728db72b0f749d269bfe..40fab124370d7c9a71fa502ff75e39cb1d31197f 100644
--- a/include/mk/automake.mk
+++ b/include/mk/automake.mk
@@ -63,11 +63,11 @@ ac-clean::

ac-distclean:: ac-clean
ac-maintainer-clean:: ac-distclean
+ $(RM) -f $(AUTOMAKE_FILES) aclocal.m4 compile config.guess config.sub configure m4/Makefile.in
+ $(MAKE) -C "$(top_srcdir)/include" $@;
for d in $(AUTOCONFED_SUBDIRS); do \
$(MAKE) -C "$(top_srcdir)/$$d" $@; \
done
- $(RM) -f aclocal.m4 configure $(AUTOMAKE_FILES) m4/Makefile.in
- $(RM) -f include/*config.h.in

# Don't include config.h, or make will (rightfully) whine about overriding
# rules.
@@ -82,10 +82,10 @@ AUTOGENERATED_FILES = \
m4/Makefile

distclean:: %: clean ac-distclean
+ $(RM) -f $(AUTOGENERATED_FILES)
for d in $(AUTOCONFED_SUBDIRS); do \
$(MAKE) -C "$(top_srcdir)/$$d" $@; \
done
- $(RM) -f $(AUTOGENERATED_FILES)

maintainer-clean:: distclean ac-maintainer-clean

--
2.49.0