configure: Tidy up removal of generated artifacts
v2 cover configure: Tidy up removal of generated artifacts
---
Changes in v2:
- Dropped the commit that added files to ac-maintainer-clean target (They're already in AUTOMAKE_FILES, thanks P. Vorel!)
- Added "compile" file to the AUTOMAKE_FILES list
- Added missing call to include/Makefile to ac-maintainer-clean target
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Ricardo B. Marlière (2):
openposix: Makefile: Add the standard "maintainer-clean" target include/Makefile: Fix cleaning targets
include/Makefile | 4 ++-- include/mk/automake.mk | 6 +++--- testcases/open_posix_testsuite/Makefile | 10 +++++++++- 3 files changed, 14 insertions(+), 6 deletions(-)
---
base-commit: 8000c950d6ba61a541a9278cdda6d68141c2fc0d
change-id: 20250327-fix_make_clean-8e57ffe1ce2c
Best regards,
Signature · 5 lines
Ricardo B. Marlière <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/2 openposix: Makefile: Add the standard "maintainer-clean" target
From: Ricardo B. Marlière <[email protected]>
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
--- testcases/open_posix_testsuite/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
testcases/open_posix_testsuite/Makefile +9 -1
@@ -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) $^
Signature · 5 lines
2.49.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 2/2 include/Makefile: Fix cleaning targets
In reply to Ricardo B. Marlière via ltpFrom: Ricardo B. Marlière <[email protected]>
Add ac-clean target as dependency of ac-maintainer-clean and add missing files to the removal list. This way the project top level Makefile cleaning targets can make use of it. Also, add "compile" to the AUTOMAKE_FILES list.
---
NOTE: The "compile" file is added during the autotools target:
$ make autotools <snip> configure.ac:26: installing './compile' configure.ac:24: installing './config.guess' configure.ac:24: installing './config.sub' configure.ac:7: installing './install-sh' configure.ac:7: installing './missing' <snip> --- include/Makefile | 4 ++-- include/mk/automake.mk | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
include/Makefile +2 -2
@@ -18,8 +18,8 @@ MAKE_TARGETS := distclean:: clean ac-distclean maintainer-clean:: distclean ac-maintainer-clean ac-clean ac-distclean:: - $(RM) -f config.h -ac-maintainer-clean:: + $(RM) -f config.h lapi/syscalls.h stamp-h1 +ac-maintainer-clean:: ac-clean $(RM) -f config.h.in vpath %.h $(abs_srcdir)
include/mk/automake.mk +3 -3
@@ -45,7 +45,7 @@ m4/ltp-version.m4: VERSION sed -n '1{s:LTP-:m4_define([LTP_VERSION],[:;s:$$:]):;p;q}' $< > $@ .PHONY: automake -AUTOMAKE_FILES := config.guess config.sub install-sh missing stamp-h1 +AUTOMAKE_FILES := compile config.guess config.sub install-sh missing automake: aclocal $(AUTOMAKE_FILES) $(AUTOMAKE_FILES): m4/Makefile.in m4/Makefile.in: m4/Makefile.am aclocal.m4
@@ -55,8 +55,8 @@ m4/Makefile.in: m4/Makefile.am aclocal.m4 ac-clean:: $(RM) -rf autom4te.cache $(RM) -f config.log config.status - $(RM) -f include/config.h include/stamp-h1 $(RM) -f m4/Makefile m4/ltp-version.m4 + $(MAKE) -C "$(top_srcdir)/include" $@; for d in $(AUTOCONFED_SUBDIRS); do \ $(MAKE) -C "$(top_srcdir)/$$d" $@; \ done
@@ -67,7 +67,7 @@ ac-maintainer-clean:: ac-distclean $(MAKE) -C "$(top_srcdir)/$$d" $@; \ done $(RM) -f aclocal.m4 configure $(AUTOMAKE_FILES) m4/Makefile.in - $(RM) -f include/*config.h.in + $(MAKE) -C "$(top_srcdir)/include" $@; # Don't include config.h, or make will (rightfully) whine about overriding # rules.
Signature · 5 lines
2.49.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp