git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wincred: align Makefile with other Makefiles in contrib
@ 2025-11-05 19:55 Thomas Uhle
  2025-11-06 14:37 ` Junio C Hamano
  2025-11-06 15:37 ` Johannes Schindelin
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Uhle @ 2025-11-05 19:55 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin

* 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(-)

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

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

end of thread, other threads:[~2025-11-09 11:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 19:55 [PATCH] wincred: align Makefile with other Makefiles in contrib Thomas Uhle
2025-11-06 14:37 ` Junio C Hamano
2025-11-06 15:37 ` Johannes Schindelin
2025-11-06 16:52   ` Junio C Hamano
2025-11-07 11:45     ` Thomas Uhle
2025-11-07 16:30       ` Junio C Hamano
2025-11-09 11:45         ` Thomas Uhle

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