[LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target

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

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

The include/mk/automake.mk file define the standard "maintainer-clean" and
"ac-maintainer-clean" targets and therein it calls the same targets under
each AUTOCONFED_SUBDIRS, but in the case of the openposix test suite, they
don't exist. Add them and also remove some dangling files in ac-clean.

This fixes the following error when calling `make maintainer-clean` from
the project's top level directory:

make[1]: Entering directory './testcases/open_posix_testsuite'
make[1]: *** No rule to make target 'ac-maintainer-clean'. Stop.
make[1]: Leaving directory './testcases/open_posix_testsuite'
make: *** [./include/mk/automake.mk:68: ac-maintainer-clean] Error 2

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/open_posix_testsuite/Makefile | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/Makefile b/testcases/open_posix_testsuite/Makefile
index 8b4c8c0a24b833fa0fb21ce3e253629f358f1800..c0ccd499b8b9c93e45133f5b3f189eda7d09beb3 100644
--- a/testcases/open_posix_testsuite/Makefile
+++ b/testcases/open_posix_testsuite/Makefile
@@ -31,11 +31,16 @@ AUTOGENERATED_FILES = include/mk/config.mk

.PHONY: ac-clean
ac-clean: clean
+ $(RM) -rf autom4te.cache
+ $(RM) -f config.log config.status
+
+.PHONE: ac-maintainer-clean
+ac-maintainer-clean:
+ $(RM) -f configure

.PHONY: clean
clean:
$(RM) -f $(LOGFILE)*
- $(RM) -f config.log config.status
@for dir in $(SUBDIRS) tools; do \
$(MAKE) -C $$dir clean >/dev/null; \
done
@@ -51,6 +56,9 @@ distclean-makefiles:
$(MAKE) -C $$dir $@; \
done

+.PHONY: maintainer-clean
+maintainer-clean: distclean-makefiles ac-maintainer-clean
+
$(AUTOGENERATED_FILES): $(top_builddir)/config.status
$(SHELL) $^

--
2.49.0