git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: don't remove configure on distclean
@ 2024-11-05 10:13 Jonas 'Sortie' Termansen
  2024-11-05 18:35 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jonas 'Sortie' Termansen @ 2024-11-05 10:13 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

make distclean conventionally restores the extracted release tarball to
its original distributed contents by cleaning the source code for
distribution. However, the configure script is part of the distribution
and should not be removed. This behavior is creating problems on my
package infrastructure where configure-based packages have make
distclean run afterwards and then the subsequent git build fails.

Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
---
 Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6f5986b66e..c488b914a0 100644
--- a/Makefile
+++ b/Makefile
@@ -3723,7 +3723,6 @@ dist-doc: git$X
 ### Cleaning rules
 
 distclean: clean
-	$(RM) configure
 	$(RM) config.log config.status config.cache
 	$(RM) config.mak.autogen config.mak.append
 	$(RM) -r autom4te.cache
-- 
2.45.2


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

* Re: [PATCH] Makefile: don't remove configure on distclean
  2024-11-05 10:13 [PATCH] Makefile: don't remove configure on distclean Jonas 'Sortie' Termansen
@ 2024-11-05 18:35 ` Junio C Hamano
  2024-11-05 19:58   ` [PATCH v2] " Jonas 'Sortie' Termansen
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2024-11-05 18:35 UTC (permalink / raw)
  To: Jonas 'Sortie' Termansen; +Cc: git

Jonas 'Sortie' Termansen <sortie@maxsi.org> writes:

> make distclean conventionally restores the extracted release tarball to
> its original distributed contents by cleaning the source code for
> distribution. However, the configure script is part of the distribution
> and should not be removed. This behavior is creating problems on my
> package infrastructure where configure-based packages have make
> distclean run afterwards and then the subsequent git build fails.

Without a target that truly cleans any build artifacts over what is
recorded in the commit to replace "make distclean", this is a
regression.  It seems people use "make reallyclean" or something for
that, perhaps?

> Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
> ---
>  Makefile | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 6f5986b66e..c488b914a0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3723,7 +3723,6 @@ dist-doc: git$X
>  ### Cleaning rules
>  
>  distclean: clean
> -	$(RM) configure
>  	$(RM) config.log config.status config.cache
>  	$(RM) config.mak.autogen config.mak.append
>  	$(RM) -r autom4te.cache

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

* [PATCH v2] Makefile: don't remove configure on distclean
  2024-11-05 18:35 ` Junio C Hamano
@ 2024-11-05 19:58   ` Jonas 'Sortie' Termansen
  0 siblings, 0 replies; 3+ messages in thread
From: Jonas 'Sortie' Termansen @ 2024-11-05 19:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

make distclean conventionally restores the extracted release tarball to
its original distributed contents by cleaning the source code for
distribution. However, the configure script is part of the distribution
and should not be removed. This behavior is creating problems on my
package infrastructure where configure-based packages have make
distclean run afterwards and then the subsequent git build fails.

Add reallyclean for development that also removes configure.

Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
---
Yeah -- I was thinking you'd want a reallyclean target or something,
but wasn't sure what to call it. Here's a version with reallyclean:

 Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 6f5986b66e..b8932e7c2b 100644
--- a/Makefile
+++ b/Makefile
@@ -3693,7 +3693,7 @@ artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \
 
 htmldocs = git-htmldocs-$(GIT_VERSION)
 manpages = git-manpages-$(GIT_VERSION)
-.PHONY: dist-doc distclean
+.PHONY: dist-doc distclean reallyclean
 dist-doc: git$X
 	$(RM) -r .doc-tmp-dir
 	mkdir .doc-tmp-dir
@@ -3723,11 +3723,13 @@ dist-doc: git$X
 ### Cleaning rules
 
 distclean: clean
-	$(RM) configure
 	$(RM) config.log config.status config.cache
 	$(RM) config.mak.autogen config.mak.append
 	$(RM) -r autom4te.cache
 
+reallyclean: distclean
+	$(RM) configure
+
 profile-clean:
 	$(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
 	$(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
-- 
2.45.2


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

end of thread, other threads:[~2024-11-05 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 10:13 [PATCH] Makefile: don't remove configure on distclean Jonas 'Sortie' Termansen
2024-11-05 18:35 ` Junio C Hamano
2024-11-05 19:58   ` [PATCH v2] " Jonas 'Sortie' Termansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).