{"thread":{"id":"62450","subject":"[PATCH] Makefile: don't remove configure on distclean","startedAt":"2024-11-05T10:14:59Z","lastAt":"2024-11-05T19:59:19Z","messageCount":3,"participants":["Jonas 'Sortie' Termansen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"506653","messageId":"76f4dfe6-3724-472b-9b42-c91926e61fd1@maxsi.org","threadId":"62450","inReplyTo":null,"subject":"[PATCH] Makefile: don't remove configure on distclean","fromName":"Jonas 'Sortie' Termansen","fromEmail":"sortie@maxsi.org","sentAt":"2024-11-05T10:13:49Z","receivedAt":"2024-11-05T10:14:59Z","isPatch":true,"sender":{"key":"sortie@maxsi.org","avatar":"https://avatars.githubusercontent.com/u/3636196?v=4"},"body":"make distclean conventionally restores the extracted release tarball to\nits original distributed contents by cleaning the source code for\ndistribution. However, the configure script is part of the distribution\nand should not be removed. This behavior is creating problems on my\npackage infrastructure where configure-based packages have make\ndistclean run afterwards and then the subsequent git build fails.\n\nSigned-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>\n---\n Makefile | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 6f5986b66e..c488b914a0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3723,7 +3723,6 @@ dist-doc: git$X\n ### Cleaning rules\n \n distclean: clean\n-\t$(RM) configure\n \t$(RM) config.log config.status config.cache\n \t$(RM) config.mak.autogen config.mak.append\n \t$(RM) -r autom4te.cache\n-- \n2.45.2\n\n"},{"id":"506671","messageId":"xmqqldxxsf4p.fsf@gitster.g","threadId":"62450","inReplyTo":"76f4dfe6-3724-472b-9b42-c91926e61fd1@maxsi.org","subject":"Re: [PATCH] Makefile: don't remove configure on distclean","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-11-05T18:35:18Z","receivedAt":"2024-11-05T18:35:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonas 'Sortie' Termansen <sortie@maxsi.org> writes:\n\n> make distclean conventionally restores the extracted release tarball to\n> its original distributed contents by cleaning the source code for\n> distribution. However, the configure script is part of the distribution\n> and should not be removed. This behavior is creating problems on my\n> package infrastructure where configure-based packages have make\n> distclean run afterwards and then the subsequent git build fails.\n\nWithout a target that truly cleans any build artifacts over what is\nrecorded in the commit to replace \"make distclean\", this is a\nregression.  It seems people use \"make reallyclean\" or something for\nthat, perhaps?\n\n> Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>\n> ---\n>  Makefile | 1 -\n>  1 file changed, 1 deletion(-)\n>\n> diff --git a/Makefile b/Makefile\n> index 6f5986b66e..c488b914a0 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -3723,7 +3723,6 @@ dist-doc: git$X\n>  ### Cleaning rules\n>  \n>  distclean: clean\n> -\t$(RM) configure\n>  \t$(RM) config.log config.status config.cache\n>  \t$(RM) config.mak.autogen config.mak.append\n>  \t$(RM) -r autom4te.cache\n"},{"id":"506681","messageId":"9b9ebfb7-9fe4-42fd-8dbc-2de85c5dbe16@maxsi.org","threadId":"62450","inReplyTo":"xmqqldxxsf4p.fsf@gitster.g","subject":"[PATCH v2] Makefile: don't remove configure on distclean","fromName":"Jonas 'Sortie' Termansen","fromEmail":"sortie@maxsi.org","sentAt":"2024-11-05T19:58:09Z","receivedAt":"2024-11-05T19:59:19Z","isPatch":true,"sender":{"key":"sortie@maxsi.org","avatar":"https://avatars.githubusercontent.com/u/3636196?v=4"},"body":"make distclean conventionally restores the extracted release tarball to\nits original distributed contents by cleaning the source code for\ndistribution. However, the configure script is part of the distribution\nand should not be removed. This behavior is creating problems on my\npackage infrastructure where configure-based packages have make\ndistclean run afterwards and then the subsequent git build fails.\n\nAdd reallyclean for development that also removes configure.\n\nSigned-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>\n---\nYeah -- I was thinking you'd want a reallyclean target or something,\nbut wasn't sure what to call it. Here's a version with reallyclean:\n\n Makefile | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 6f5986b66e..b8932e7c2b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3693,7 +3693,7 @@ artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \\\n \n htmldocs = git-htmldocs-$(GIT_VERSION)\n manpages = git-manpages-$(GIT_VERSION)\n-.PHONY: dist-doc distclean\n+.PHONY: dist-doc distclean reallyclean\n dist-doc: git$X\n \t$(RM) -r .doc-tmp-dir\n \tmkdir .doc-tmp-dir\n@@ -3723,11 +3723,13 @@ dist-doc: git$X\n ### Cleaning rules\n \n distclean: clean\n-\t$(RM) configure\n \t$(RM) config.log config.status config.cache\n \t$(RM) config.mak.autogen config.mak.append\n \t$(RM) -r autom4te.cache\n \n+reallyclean: distclean\n+\t$(RM) configure\n+\n profile-clean:\n \t$(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))\n \t$(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))\n-- \n2.45.2\n\n"}]}