]> git.ipfire.org Git - thirdparty/git.git/commitdiff
contrib/credential: add install target
authorThomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
Sat, 25 Oct 2025 20:30:07 +0000 (22:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 26 Oct 2025 01:27:56 +0000 (18:27 -0700)
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>
contrib/credential/libsecret/Makefile
contrib/credential/osxkeychain/Makefile

index 7cacc576818338a286815fb32d38351fcee65ed3..9309cfb78c7f6c7336772620739d29f45fc72569 100644 (file)
@@ -10,6 +10,7 @@ gitexecdir ?= $(prefix)/libexec/git-core
 CC ?= gcc
 CFLAGS ?= -g -O2 -Wall
 PKG_CONFIG ?= pkg-config
+INSTALL ?= install
 RM ?= rm -f
 
 INCS:=$(shell $(PKG_CONFIG) --cflags libsecret-1 glib-2.0)
@@ -21,7 +22,11 @@ LIBS:=$(shell $(PKG_CONFIG) --libs libsecret-1 glib-2.0)
 git-credential-libsecret: git-credential-libsecret.o
        $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
 
+install: git-credential-libsecret
+       $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
+       $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
+
 clean:
        $(RM) git-credential-libsecret git-credential-libsecret.o
 
-.PHONY: all clean
+.PHONY: all install clean
index c7d9121022b0e5de6f7530107e9deb0c3c957a82..9680717abe44c6d2813d71884c5c8a19875bf36e 100644 (file)
@@ -9,6 +9,7 @@ gitexecdir ?= $(prefix)/libexec/git-core
 
 CC ?= gcc
 CFLAGS ?= -g -O2 -Wall
+INSTALL ?= install
 RM ?= rm -f
 
 %.o: %.c
@@ -18,7 +19,11 @@ git-credential-osxkeychain: git-credential-osxkeychain.o
        $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \
                -framework Security -framework CoreFoundation
 
+install: git-credential-osxkeychain
+       $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
+       $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
+
 clean:
        $(RM) git-credential-osxkeychain git-credential-osxkeychain.o
 
-.PHONY: all clean
+.PHONY: all install clean