public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/4] configure: Tidy up removal of generated artifacts
@ 2025-03-27 21:56 Ricardo B. Marliere via ltp
  2025-03-27 21:56 ` [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference Ricardo B. Marliere via ltp
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-03-27 21:56 UTC (permalink / raw)
  To: Linux Test Project; +Cc: Ricardo B. Marlière

Hello folks,

The goal of this series is to fix the top-level `make maintainer-clean` [1]
so that it removes everything the build system generated. The motivation is
that I was using `git clean -fdx` instead of -fdX and inevitably lost some
work, then I realized the cleaning targets were not actually cleaning
everything, e.g.:

(master)
$ make autotools
$ ./configure
$ make maintainer-clean
$ git clean -fdx
Removing aclocal.m4
Removing compile
Removing config.guess
Removing config.sub
Removing configure
Removing include/config.h.in
Removing include/lapi/syscalls.h
Removing include/mk/config-openposix.mk
Removing install-sh
Removing m4/Makefile.in
Removing missing
Removing testcases/open_posix_testsuite/autom4te.cache/
Removing testcases/open_posix_testsuite/configure

So, with this series applied then `git clean -fdx` won't have anything left
to remove.

Please consider pulling,
-	Ricardo.

[1]: https://www.gnu.org/prep/standards/html_node/Standard-Targets.html

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Ricardo B. Marlière (4):
      configure: Add missing include/mk/config-openposix.mk reference
      openposix: Makefile: Add the standard "maintainer-clean" target
      include/Makefile: Fix cleaning targets
      configure: Add missing files for removal in ac-maintainer-clean target

 configure.ac                            |  2 ++
 include/Makefile                        |  4 ++--
 include/mk/automake.mk                  | 11 ++++++-----
 testcases/open_posix_testsuite/Makefile | 10 +++++++++-
 4 files changed, 19 insertions(+), 8 deletions(-)
---
base-commit: e3aef569f0d0e7079bdb646965afaf419035eaa5
change-id: 20250327-fix_make_clean-8e57ffe1ce2c

Best regards,
-- 
Ricardo B. Marlière <rbm@suse.com>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference
  2025-03-27 21:56 [LTP] [PATCH 0/4] configure: Tidy up removal of generated artifacts Ricardo B. Marliere via ltp
@ 2025-03-27 21:56 ` Ricardo B. Marliere via ltp
  2025-03-28 10:31   ` Cyril Hrubis
  2025-03-27 21:56 ` [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target Ricardo B. Marliere via ltp
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-03-27 21:56 UTC (permalink / raw)
  To: Linux Test Project; +Cc: Ricardo B. Marlière

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

The file include/mk/config-openposix.mk should be added to the
AUTOGENERATED_FILES array in include/mk/automake.mk so that it can be
cleaned in the cleaning targets. Also, add a small comment in configure.ac
so it does not happen again.

Cc: Cyril Hrubis <chrubis@suse.cz>
Fixes: 63b6532ff150 ("open_posix_testsuite: Propagate configure params")
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
 configure.ac           | 2 ++
 include/mk/automake.mk | 1 +
 2 files changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index 671079f3aa48c72866f69e7c545d3428ba87f931..ddb1f6e4e0787fe4bc4d9729470e52237930a120 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,8 @@ AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS([include/config.h])
 AC_CONFIG_MACRO_DIR([m4])
+
+# Adding files here? Please update include/mk/automake.mk
 AC_CONFIG_FILES([ \
     include/mk/config.mk \
     include/mk/config-openposix.mk \
diff --git a/include/mk/automake.mk b/include/mk/automake.mk
index 79f83a5a2edf2a4a10b7587a36e792397cfb5d64..3df3b4ba99ca865caa89388999e53cbc500615dc 100644
--- a/include/mk/automake.mk
+++ b/include/mk/automake.mk
@@ -76,6 +76,7 @@ ac-maintainer-clean:: ac-distclean
 #
 AUTOGENERATED_FILES	= \
 			include/mk/config.mk	\
+			include/mk/config-openposix.mk \
 			include/mk/features.mk	\
 			lib/ltp.pc		\
 			m4/Makefile

-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target
  2025-03-27 21:56 [LTP] [PATCH 0/4] configure: Tidy up removal of generated artifacts Ricardo B. Marliere via ltp
  2025-03-27 21:56 ` [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference Ricardo B. Marliere via ltp
@ 2025-03-27 21:56 ` Ricardo B. Marliere via ltp
  2025-04-01  7:38   ` Petr Vorel
  2025-03-27 21:56 ` [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets Ricardo B. Marliere via ltp
  2025-03-27 21:56 ` [LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target Ricardo B. Marliere via ltp
  3 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-03-27 21:56 UTC (permalink / raw)
  To: Linux Test Project; +Cc: Ricardo B. Marlière

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets
  2025-03-27 21:56 [LTP] [PATCH 0/4] configure: Tidy up removal of generated artifacts Ricardo B. Marliere via ltp
  2025-03-27 21:56 ` [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference Ricardo B. Marliere via ltp
  2025-03-27 21:56 ` [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target Ricardo B. Marliere via ltp
@ 2025-03-27 21:56 ` Ricardo B. Marliere via ltp
  2025-04-01  7:47   ` Petr Vorel
  2025-03-27 21:56 ` [LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target Ricardo B. Marliere via ltp
  3 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-03-27 21:56 UTC (permalink / raw)
  To: Linux Test Project; +Cc: Ricardo B. Marlière

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

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.

Cc: Andrea Cervesato <andrea.cervesato@suse.com>
Fixes: 817d8095fbfe ("Rename linux_syscall_numbers.h to lapi/syscalls.h")
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
 include/Makefile       | 4 ++--
 include/mk/automake.mk | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/Makefile b/include/Makefile
index 25e96df9b8cdd7d1d7e6f19925bf2160d682f0d9..6b31b046e452e71afb5097cc3fadf8af01282629 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -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)
diff --git a/include/mk/automake.mk b/include/mk/automake.mk
index 3df3b4ba99ca865caa89388999e53cbc500615dc..d96da8313dc8dc4f4d6d728db72b0f749d269bfe 100644
--- a/include/mk/automake.mk
+++ b/include/mk/automake.mk
@@ -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 := 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

-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target
  2025-03-27 21:56 [LTP] [PATCH 0/4] configure: Tidy up removal of generated artifacts Ricardo B. Marliere via ltp
                   ` (2 preceding siblings ...)
  2025-03-27 21:56 ` [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets Ricardo B. Marliere via ltp
@ 2025-03-27 21:56 ` Ricardo B. Marliere via ltp
  2025-04-01  7:58   ` Petr Vorel
  3 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marliere via ltp @ 2025-03-27 21:56 UTC (permalink / raw)
  To: Linux Test Project; +Cc: Ricardo B. Marlière

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference
  2025-03-27 21:56 ` [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference Ricardo B. Marliere via ltp
@ 2025-03-28 10:31   ` Cyril Hrubis
  2025-04-01  7:24     ` Petr Vorel
  0 siblings, 1 reply; 13+ messages in thread
From: Cyril Hrubis @ 2025-03-28 10:31 UTC (permalink / raw)
  To: rbm; +Cc: Linux Test Project

Hi!
Good catch.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference
  2025-03-28 10:31   ` Cyril Hrubis
@ 2025-04-01  7:24     ` Petr Vorel
  0 siblings, 0 replies; 13+ messages in thread
From: Petr Vorel @ 2025-04-01  7:24 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: Linux Test Project, rbm

Hi all,

thanks obvious fix, merged.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target
  2025-03-27 21:56 ` [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target Ricardo B. Marliere via ltp
@ 2025-04-01  7:38   ` Petr Vorel
  2025-04-01 14:40     ` Ricardo B. Marli��re via ltp
  0 siblings, 1 reply; 13+ messages in thread
From: Petr Vorel @ 2025-04-01  7:38 UTC (permalink / raw)
  To: rbm; +Cc: Linux Test Project

Hi Ricardo,

> 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

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks for fixing dark corners of LTP build system.

What a strange target name. Obviously it was meant to be run before release
file, but it was not even called in Makefile.release which I removed in
1088d93d99.

I was thinking whether we really need this target. Maybe it could be part of
distclean.

Kind regards,
Petr

> 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) $^

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets
  2025-03-27 21:56 ` [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets Ricardo B. Marliere via ltp
@ 2025-04-01  7:47   ` Petr Vorel
  2025-04-01 14:43     ` Ricardo B. Marli��re via ltp
  0 siblings, 1 reply; 13+ messages in thread
From: Petr Vorel @ 2025-04-01  7:47 UTC (permalink / raw)
  To: rbm; +Cc: Linux Test Project

Hi Ricardo,

> 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.

> Cc: Andrea Cervesato <andrea.cervesato@suse.com>
> Fixes: 817d8095fbfe ("Rename linux_syscall_numbers.h to lapi/syscalls.h")

I did not get how this commit broke the functionality.

Change LGTM.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target
  2025-03-27 21:56 ` [LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target Ricardo B. Marliere via ltp
@ 2025-04-01  7:58   ` Petr Vorel
  0 siblings, 0 replies; 13+ messages in thread
From: Petr Vorel @ 2025-04-01  7:58 UTC (permalink / raw)
  To: rbm; +Cc: Linux Test Project

> 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

OK, this removes "compile" file (Wrapper for compilers which do not understand
'-c -o'). Interesting. IMHO the rest of newly explicitly added files (e.g.
config.guess, config.sub, m4/Makefile.in) were removed without this change (part
of $(AUTOMAKE_FILES) ).

rm -f -f aclocal.m4 configure config.guess config.sub install-sh missing m4/Makefile.in
rm -f -f include/*config.h.in

Kind regards,
Petr

> +	$(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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target
  2025-04-01  7:38   ` Petr Vorel
@ 2025-04-01 14:40     ` Ricardo B. Marli��re via ltp
  0 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marli��re via ltp @ 2025-04-01 14:40 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Linux Test Project

On Tue Apr 1, 2025 at 4:38 AM -03, Petr Vorel wrote:
> Hi Ricardo,
>
>> 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
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Thanks for fixing dark corners of LTP build system.
>
> What a strange target name. Obviously it was meant to be run before release
> file, but it was not even called in Makefile.release which I removed in
> 1088d93d99.
>
> I was thinking whether we really need this target. Maybe it could be part of
> distclean.

Strange indeed, I was not aware of it until now... As I mentioned in the
cover letter, its a standard target. Both approaches make sense to me,
either we keep it or unify it with distclean. Not sure what others
prefer, but I would like to have a proper clean without relying on git.

Thank you,
-	Ricardo.


>
> Kind regards,
> Petr
>
>> 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) $^


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets
  2025-04-01  7:47   ` Petr Vorel
@ 2025-04-01 14:43     ` Ricardo B. Marli��re via ltp
  2025-04-01 19:35       ` Petr Vorel
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marli��re via ltp @ 2025-04-01 14:43 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Linux Test Project

On Tue Apr 1, 2025 at 4:47 AM -03, Petr Vorel wrote:
> Hi Ricardo,
>
>> 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.
>
>> Cc: Andrea Cervesato <andrea.cervesato@suse.com>
>> Fixes: 817d8095fbfe ("Rename linux_syscall_numbers.h to lapi/syscalls.h")
>
> I did not get how this commit broke the functionality.

It did not break anything, but either that commit or the one that added
the older "linux_syscall_numbers.h" file should have also marked it for
removal. Should I drop the Fixes: tag?

>
> Change LGTM.
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks,
-	Ricardo.



-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets
  2025-04-01 14:43     ` Ricardo B. Marli��re via ltp
@ 2025-04-01 19:35       ` Petr Vorel
  0 siblings, 0 replies; 13+ messages in thread
From: Petr Vorel @ 2025-04-01 19:35 UTC (permalink / raw)
  To: Ricardo B. Marlière; +Cc: Linux Test Project

> On Tue Apr 1, 2025 at 4:47 AM -03, Petr Vorel wrote:
> > Hi Ricardo,

> >> 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.

> >> Cc: Andrea Cervesato <andrea.cervesato@suse.com>
> >> Fixes: 817d8095fbfe ("Rename linux_syscall_numbers.h to lapi/syscalls.h")

> > I did not get how this commit broke the functionality.

> It did not break anything, but either that commit or the one that added
> the older "linux_syscall_numbers.h" file should have also marked it for
> removal. Should I drop the Fixes: tag?

I guess it's ok to keep.

Kind regards,
Petr


> > Change LGTM.

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> Thanks,
> -	Ricardo.



-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-04-01 19:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 21:56 [LTP] [PATCH 0/4] configure: Tidy up removal of generated artifacts Ricardo B. Marliere via ltp
2025-03-27 21:56 ` [LTP] [PATCH 1/4] configure: Add missing include/mk/config-openposix.mk reference Ricardo B. Marliere via ltp
2025-03-28 10:31   ` Cyril Hrubis
2025-04-01  7:24     ` Petr Vorel
2025-03-27 21:56 ` [LTP] [PATCH 2/4] openposix: Makefile: Add the standard "maintainer-clean" target Ricardo B. Marliere via ltp
2025-04-01  7:38   ` Petr Vorel
2025-04-01 14:40     ` Ricardo B. Marli��re via ltp
2025-03-27 21:56 ` [LTP] [PATCH 3/4] include/Makefile: Fix cleaning targets Ricardo B. Marliere via ltp
2025-04-01  7:47   ` Petr Vorel
2025-04-01 14:43     ` Ricardo B. Marli��re via ltp
2025-04-01 19:35       ` Petr Vorel
2025-03-27 21:56 ` [LTP] [PATCH 4/4] configure: Add missing files for removal in ac-maintainer-clean target Ricardo B. Marliere via ltp
2025-04-01  7:58   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox