git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 6, 2025, 14:37 UTC
Message-ID
<xmqqtsz7jkgh.fsf@gitster.g>
In-Reply-To
<3869ec21-e20d-cf9b-5913-6389c372a5f0@mailbox.tu-dresden.de>
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
Previous: Thomas UhleNext: Johannes Schindelin
Message 2 of 7 in “wincred: align Makefile with other Makefiles in contrib”
  1. wincred: align Makefile with other Makefiles in contribThomas Uhle, Nov 5, 2025
  2. Junio C HamanoNov 6, 2025
  3. Johannes SchindelinNov 6, 2025
  4. Junio C HamanoNov 6, 2025
  5. Thomas UhleNov 7, 2025
  6. Junio C HamanoNov 7, 2025
  7. Thomas UhleNov 9, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.