threads / patch / 64446

patchwincred: align Makefile with other Makefiles in contrib

Subject: [PATCH] wincred: align Makefile with other Makefiles in contrib

## tl;dr

7 messages between Nov 5, 2025 and Nov 9, 2025. Diffs are folded; open one to read it.

replies: 6people: 3as markdown or json

Thomas Uhle· Nov 5, 2025, 19:55 UTC · lore
* Replace $(LOADLIBES) because it is deprecated since long and it is
  used nowhere else in the git project.
* Use $(gitexecdir) instead of $(libexecdir) because config.mak defines
  $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core.
* Similar to other Makefiles, let install target rule create
  $(gitexecdir) to make sure the directory exists before copying the
  executable and also let it respect $(DESTDIR).
* Shuffle the lines for the default settings to align them with the
  other Makefiles in contrib/credential.
* Define .PHONY for all special targets (all, install, clean).
Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
---
 contrib/credential/wincred/Makefile | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
Show changes to contrib/credential/wincred/Makefile +10 −8
diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
index 5b795fc..d92e721 100644
--- a/contrib/credential/wincred/Makefile
+++ b/contrib/credential/wincred/Makefile
@@ -4,20 +4,22 @@
 -include ../../../config.mak.autogen
 -include ../../../config.mak

-CC ?= gcc
-RM ?= rm -f
-CFLAGS ?= -O2 -Wall
-
 prefix ?= /usr/local
-libexecdir ?= $(prefix)/libexec/git-core
+gitexecdir ?= $(prefix)/libexec/git-core

+CC ?= gcc
+CFLAGS ?= -O2 -Wall
 INSTALL ?= install
+RM ?= rm -f

-git-credential-wincred.exe : git-credential-wincred.c
-	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
+git-credential-wincred.exe: git-credential-wincred.c
+	$(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)

 install: git-credential-wincred.exe
-	$(INSTALL) -m 755 $^ $(libexecdir)
+	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
+	$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)

 clean:
 	$(RM) git-credential-wincred.exe
+
+.PHONY: all install clean

base-commit: 4cf919bd7b946477798af5414a371b23fd68bf93
-- 
2.47.3
Junio C Hamano· Nov 6, 2025, 14:37 UTC · re: Thomas Uhle · lore

Re: [PATCH] wincred: align Makefile with other Makefiles in contrib

Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de> writes:
Show 15 quoted lines
> * Replace $(LOADLIBES) because it is deprecated since long and it is
>   used nowhere else in the git project.
> * Use $(gitexecdir) instead of $(libexecdir) because config.mak defines
>   $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core.
> * Similar to other Makefiles, let install target rule create
>   $(gitexecdir) to make sure the directory exists before copying the
>   executable and also let it respect $(DESTDIR).
> * Shuffle the lines for the default settings to align them with the
>   other Makefiles in contrib/credential.
> * Define .PHONY for all special targets (all, install, clean).
>
> Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
> ---
>  contrib/credential/wincred/Makefile | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Looks sensible (to a person who does not do Windows, anyway), but I do not know what depends on the way it is currently laid out, so will queue only after I see a Windows person or two give their acks to the patch.

Thanks.
Show 37 quoted lines
> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
> index 5b795fc..d92e721 100644
> --- a/contrib/credential/wincred/Makefile
> +++ b/contrib/credential/wincred/Makefile
> @@ -4,20 +4,22 @@
>  -include ../../../config.mak.autogen
>  -include ../../../config.mak
>
> -CC ?= gcc
> -RM ?= rm -f
> -CFLAGS ?= -O2 -Wall
> -
>  prefix ?= /usr/local
> -libexecdir ?= $(prefix)/libexec/git-core
> +gitexecdir ?= $(prefix)/libexec/git-core
>
> +CC ?= gcc
> +CFLAGS ?= -O2 -Wall
>  INSTALL ?= install
> +RM ?= rm -f
>
> -git-credential-wincred.exe : git-credential-wincred.c
> -	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
> +git-credential-wincred.exe: git-credential-wincred.c
> +	$(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)
>
>  install: git-credential-wincred.exe
> -	$(INSTALL) -m 755 $^ $(libexecdir)
> +	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
> +	$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
>
>  clean:
>  	$(RM) git-credential-wincred.exe
> +
> +.PHONY: all install clean
>
> base-commit: 4cf919bd7b946477798af5414a371b23fd68bf93
Johannes Schindelin· Nov 6, 2025, 15:37 UTC · re: Thomas Uhle · lore

Re: [PATCH] wincred: align Makefile with other Makefiles in contrib

Hallo Thomas, wie geht's? Grüße an den Biergarten am Blauen Wunder!
On Wed, 5 Nov 2025, Thomas Uhle wrote:
Show 10 quoted lines
> * Replace $(LOADLIBES) because it is deprecated since long and it is
>   used nowhere else in the git project.
> * Use $(gitexecdir) instead of $(libexecdir) because config.mak defines
>   $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core.
> * Similar to other Makefiles, let install target rule create
>   $(gitexecdir) to make sure the directory exists before copying the
>   executable and also let it respect $(DESTDIR).
> * Shuffle the lines for the default settings to align them with the
>   other Makefiles in contrib/credential.
> * Define .PHONY for all special targets (all, install, clean).
These changes all make sense to me. Feel free to add
	Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Thank you, Johannes

Show 47 quoted lines
> 
> Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
> ---
>  contrib/credential/wincred/Makefile | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
> index 5b795fc..d92e721 100644
> --- a/contrib/credential/wincred/Makefile
> +++ b/contrib/credential/wincred/Makefile
> @@ -4,20 +4,22 @@
>  -include ../../../config.mak.autogen
>  -include ../../../config.mak
> 
> -CC ?= gcc
> -RM ?= rm -f
> -CFLAGS ?= -O2 -Wall
> -
>  prefix ?= /usr/local
> -libexecdir ?= $(prefix)/libexec/git-core
> +gitexecdir ?= $(prefix)/libexec/git-core
> 
> +CC ?= gcc
> +CFLAGS ?= -O2 -Wall
>  INSTALL ?= install
> +RM ?= rm -f
> 
> -git-credential-wincred.exe : git-credential-wincred.c
> -	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
> +git-credential-wincred.exe: git-credential-wincred.c
> +	$(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)
> 
>  install: git-credential-wincred.exe
> -	$(INSTALL) -m 755 $^ $(libexecdir)
> +	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
> +	$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
> 
>  clean:
>  	$(RM) git-credential-wincred.exe
> +
> +.PHONY: all install clean
> 
> base-commit: 4cf919bd7b946477798af5414a371b23fd68bf93
> -- 
> 2.47.3
> 
> 
Junio C Hamano· Nov 6, 2025, 16:52 UTC · re: Johannes Schindelin · lore

Re: [PATCH] wincred: align Makefile with other Makefiles in contrib

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 21 quoted lines
> Hallo Thomas, wie geht's? Grüße an den Biergarten am Blauen Wunder!
>
> On Wed, 5 Nov 2025, Thomas Uhle wrote:
>
>> * Replace $(LOADLIBES) because it is deprecated since long and it is
>>   used nowhere else in the git project.
>> * Use $(gitexecdir) instead of $(libexecdir) because config.mak defines
>>   $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core.
>> * Similar to other Makefiles, let install target rule create
>>   $(gitexecdir) to make sure the directory exists before copying the
>>   executable and also let it respect $(DESTDIR).
>> * Shuffle the lines for the default settings to align them with the
>>   other Makefiles in contrib/credential.
>> * Define .PHONY for all special targets (all, install, clean).
>
> These changes all make sense to me. Feel free to add
>
> 	Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Thank you,
> Johannes
Thanks, both.  Will queue with your Ack.
Show 48 quoted lines
>
>> 
>> Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
>> ---
>>  contrib/credential/wincred/Makefile | 18 ++++++++++--------
>>  1 file changed, 10 insertions(+), 8 deletions(-)
>> 
>> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
>> index 5b795fc..d92e721 100644
>> --- a/contrib/credential/wincred/Makefile
>> +++ b/contrib/credential/wincred/Makefile
>> @@ -4,20 +4,22 @@
>>  -include ../../../config.mak.autogen
>>  -include ../../../config.mak
>> 
>> -CC ?= gcc
>> -RM ?= rm -f
>> -CFLAGS ?= -O2 -Wall
>> -
>>  prefix ?= /usr/local
>> -libexecdir ?= $(prefix)/libexec/git-core
>> +gitexecdir ?= $(prefix)/libexec/git-core
>> 
>> +CC ?= gcc
>> +CFLAGS ?= -O2 -Wall
>>  INSTALL ?= install
>> +RM ?= rm -f
>> 
>> -git-credential-wincred.exe : git-credential-wincred.c
>> -	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
>> +git-credential-wincred.exe: git-credential-wincred.c
>> +	$(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)
>> 
>>  install: git-credential-wincred.exe
>> -	$(INSTALL) -m 755 $^ $(libexecdir)
>> +	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
>> +	$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
>> 
>>  clean:
>>  	$(RM) git-credential-wincred.exe
>> +
>> +.PHONY: all install clean
>> 
>> base-commit: 4cf919bd7b946477798af5414a371b23fd68bf93
>> -- 
>> 2.47.3
>> 
>> 
Thomas Uhle· Nov 7, 2025, 11:45 UTC · re: Junio C Hamano · lore

Re: [PATCH] wincred: align Makefile with other Makefiles in contrib

On Thu, 6 Nov 2025, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> Hallo Thomas, wie geht's? Grüße an den Biergarten am Blauen Wunder!

Ich komme am Schillergarten so bald leider nicht vorbei, es ist einfach zu ungemütlich draußen, und Glühwein gibt es vermutlich auch noch nicht. ;)

Show 21 quoted lines
>> On Wed, 5 Nov 2025, Thomas Uhle wrote:
>>
>>> * Replace $(LOADLIBES) because it is deprecated since long and it is
>>>   used nowhere else in the git project.
>>> * Use $(gitexecdir) instead of $(libexecdir) because config.mak defines
>>>   $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core.
>>> * Similar to other Makefiles, let install target rule create
>>>   $(gitexecdir) to make sure the directory exists before copying the
>>>   executable and also let it respect $(DESTDIR).
>>> * Shuffle the lines for the default settings to align them with the
>>>   other Makefiles in contrib/credential.
>>> * Define .PHONY for all special targets (all, install, clean).
>>
>> These changes all make sense to me. Feel free to add
>>
>> 	Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>>
>> Thank you,
>> Johannes
>
> Thanks, both.  Will queue with your Ack.

Thank you! Does this patch qualify for the final version 2.52.0 or is it already too late? And if it is the latter, wouldn't it make sense to have it in an updated version 2.52.1?

Best regards,
Thomas
Show 46 quoted lines
>>>
>>> Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
>>> ---
>>>  contrib/credential/wincred/Makefile | 18 ++++++++++--------
>>>  1 file changed, 10 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile
>>> index 5b795fc..d92e721 100644
>>> --- a/contrib/credential/wincred/Makefile
>>> +++ b/contrib/credential/wincred/Makefile
>>> @@ -4,20 +4,22 @@
>>>  -include ../../../config.mak.autogen
>>>  -include ../../../config.mak
>>>
>>> -CC ?= gcc
>>> -RM ?= rm -f
>>> -CFLAGS ?= -O2 -Wall
>>> -
>>>  prefix ?= /usr/local
>>> -libexecdir ?= $(prefix)/libexec/git-core
>>> +gitexecdir ?= $(prefix)/libexec/git-core
>>>
>>> +CC ?= gcc
>>> +CFLAGS ?= -O2 -Wall
>>>  INSTALL ?= install
>>> +RM ?= rm -f
>>>
>>> -git-credential-wincred.exe : git-credential-wincred.c
>>> -	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
>>> +git-credential-wincred.exe: git-credential-wincred.c
>>> +	$(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS)
>>>
>>>  install: git-credential-wincred.exe
>>> -	$(INSTALL) -m 755 $^ $(libexecdir)
>>> +	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
>>> +	$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
>>>
>>>  clean:
>>>  	$(RM) git-credential-wincred.exe
>>> +
>>> +.PHONY: all install clean
>>>
>>> base-commit: 4cf919bd7b946477798af5414a371b23fd68bf93
>>> --
>>> 2.47.3
>>>
Junio C Hamano· Nov 7, 2025, 16:30 UTC · re: Thomas Uhle · lore

Re: [PATCH] wincred: align Makefile with other Makefiles in contrib

Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de> writes:
> Thank you!  Does this patch qualify for the final version 2.52.0 or is it 
> already too late?  And if it is the latter, wouldn't it make sense to have 
> it in an updated version 2.52.1?
Highly unlikely, I would suspect.

In general, after -rc1 gets tagged, nothing will become candidate for the final release without a valid excuse. One common reason is that it is a bugfix for a regression that was introduced during the cycle. This clearly isn't one---the aspect of the wincred Makefile your patch fixes haven't changed since ccfb5bda (wincred: add install target, 2012-10-24). People lived with that awkwardness for 13 years. They can live with it a few more months just fine.

Those who _have_ been building wincred and installing it for their own (or for their colleages) would have an established procedure to work around the unusual arrangement the Makefile has (which you have fixed), and changing it this close to the final release would only add extra work on them, without helping anybody else. A good time to merge such a change is early in a fresh cycle, so that they have longer preparation period to adjust their build infrastructure.

There are reasons we may want to have changes newly floated after -rc1 got tagged; for example, I merged 8d716966 (ci: update {download,upload}-artifact Action versions, 2025-11-06) after tagging -rc1. There were another CI fix merged immediately before -rc1.

The benefit any late changes that get merged has to outweigh the risks by a large margin, and CI changes like these have very small blast radius even if it goes wrong (nobody other than our developers would be affected, and they know what to do) while the damage unfixed CI job can cause is larger (CI can deliberately stop to make us realize that the service we rely on is being deprecated).

There also is a message typofix merged post -rc1, to correct new messages that appeared during this cycle. The output from the programs before the release candidate were properly localizable, but left unfixed, our translators need to translate typoed messages, and then when the typofix hits 'master' later, they have to adjust their translations by updating what original gets translated again.

Is there comparable justification why wincred/Makefile change has to be in the upcoming release? I do not think of any.

Thomas Uhle· Nov 9, 2025, 11:45 UTC · re: Junio C Hamano · lore

Re: [PATCH] wincred: align Makefile with other Makefiles in contrib

On Fri, 7 Nov 2025, Junio C Hamano wrote:
Show 15 quoted lines
> Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de> writes:
>
>> Thank you!  Does this patch qualify for the final version 2.52.0 or is it
>> already too late?  And if it is the latter, wouldn't it make sense to have
>> it in an updated version 2.52.1?
>
> Highly unlikely, I would suspect.
>
> In general, after -rc1 gets tagged, nothing will become candidate
> for the final release without a valid excuse.  One common reason is
> that it is a bugfix for a regression that was introduced during the
> cycle.  This clearly isn't one---the aspect of the wincred Makefile
> your patch fixes haven't changed since ccfb5bda (wincred: add
> install target, 2012-10-24).  People lived with that awkwardness for
> 13 years.  They can live with it a few more months just fine.
I agree.  Fair enough.
Show 7 quoted lines
> Those who _have_ been building wincred and installing it for their
> own (or for their colleages) would have an established procedure to
> work around the unusual arrangement the Makefile has (which you have
> fixed), and changing it this close to the final release would only
> add extra work on them, without helping anybody else.  A good time
> to merge such a change is early in a fresh cycle, so that they have
> longer preparation period to adjust their build infrastructure.
Understood.
Show 22 quoted lines
> There are reasons we may want to have changes newly floated after
> -rc1 got tagged; for example, I merged 8d716966 (ci: update
> {download,upload}-artifact Action versions, 2025-11-06) after
> tagging -rc1.  There were another CI fix merged immediately before
> -rc1.
>
> The benefit any late changes that get merged has to outweigh the
> risks by a large margin, and CI changes like these have very small
> blast radius even if it goes wrong (nobody other than our developers
> would be affected, and they know what to do) while the damage
> unfixed CI job can cause is larger (CI can deliberately stop to make
> us realize that the service we rely on is being deprecated).
>
> There also is a message typofix merged post -rc1, to correct new
> messages that appeared during this cycle.  The output from the
> programs before the release candidate were properly localizable, but
> left unfixed, our translators need to translate typoed messages, and
> then when the typofix hits 'master' later, they have to adjust their
> translations by updating what original gets translated again.
>
> Is there comparable justification why wincred/Makefile change has to
> be in the upcoming release?  I do not think of any.

You are right though. I have just thought that it might be good to have all the three commits for the update of the Makefiles in contrib/credential "in one go". Yet, this is by far not comparable to those other cases. Thanks for your explanations!

Best regards,
Thomas Uhle

← back to recent threads