contrib/credential: add install target

Add an install target rule to the Makefiles in contrib/credential in the same manner as in other Makefiles in contrib such as for contacts or subtree. Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Uhle committed Oct 25, 2025 at 22:30 UTC 595be20d22401538534197430cdee6b26f67533e
2 files changed +12 -2
contrib/credential/libsecret/Makefile
+6 -1
@@ -10,6 +10,7 @@ gitexecdir ?= $(prefix)/libexec/git-core
10 CC ?= gcc
11 CFLAGS ?= -g -O2 -Wall
12 PKG_CONFIG ?= pkg-config
13 +INSTALL ?= install
14 RM ?= rm -f
15
16 INCS:=$(shell $(PKG_CONFIG) --cflags libsecret-1 glib-2.0)
@@ -21,7 +22,11 @@ LIBS:=$(shell $(PKG_CONFIG) --libs libsecret-1 glib-2.0)
22 git-credential-libsecret: git-credential-libsecret.o
23 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
24
25 +install: git-credential-libsecret
26 + $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
27 + $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
28 +
29 clean:
30 $(RM) git-credential-libsecret git-credential-libsecret.o
31
27 -.PHONY: all clean
32 +.PHONY: all install clean
contrib/credential/osxkeychain/Makefile
+6 -1
@@ -9,6 +9,7 @@ gitexecdir ?= $(prefix)/libexec/git-core
9
10 CC ?= gcc
11 CFLAGS ?= -g -O2 -Wall
12 +INSTALL ?= install
13 RM ?= rm -f
14
15 %.o: %.c
@@ -18,7 +19,11 @@ git-credential-osxkeychain: git-credential-osxkeychain.o
19 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \
20 -framework Security -framework CoreFoundation
21
22 +install: git-credential-osxkeychain
23 + $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
24 + $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
25 +
26 clean:
27 $(RM) git-credential-osxkeychain git-credential-osxkeychain.o
28
24 -.PHONY: all clean
29 +.PHONY: all install clean