threads / patch / 64385

patchcontrib/credential: add install target

Subject: [PATCH] contrib/credential: add install target

## tl;dr

2 messages between Oct 25, 2025 and Oct 25, 2025. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Thomas Uhle· Oct 25, 2025, 20:15 UTC · lore

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. --- This is the follow-up commit on top of some clean-up changes to the Makefiles in contrib/credential that I have been asked to send as a separate patch. Here is the previous patch: https://lore.kernel.org/git/0a61b0b3-365b-c198-6afd-f26fcd5a9c20@mailbox.tu-dresden.de/

 contrib/credential/libsecret/Makefile   | 7 ++++++-
 contrib/credential/osxkeychain/Makefile | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
Show changes to 2 files +12 −2

contrib/credential/libsecret/Makefile, contrib/credential/osxkeychain/Makefile

diff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile
index 7cacc57..b10cfa3 100644
--- a/contrib/credential/libsecret/Makefile
+++ b/contrib/credential/libsecret/Makefile
@@ -10,6 +10,7 @@
 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 @@
 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
diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile
index c7d9121..5569581 100644
--- a/contrib/credential/osxkeychain/Makefile
+++ b/contrib/credential/osxkeychain/Makefile
@@ -9,6 +9,7 @@

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

 %.o: %.c
@@ -18,7 +19,11 @@
 	$(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

base-commit: 4e98b730f18d59b670ee57b803e5048b9d14b968
-- 
2.47.3
Thomas Uhle· Oct 25, 2025, 20:30 UTC · re: Thomas Uhle · lore

[PATCH v2] 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>
---
I am terribly sorry to send this patch again as I forgot to add the
"Signed-off-by" footer.  Everything else is still the same.

This is the follow-up commit on top of some clean-up changes to the Makefiles in contrib/credential that I have been asked to send as a separate patch. Here is the previous patch: https://lore.kernel.org/git/0a61b0b3-365b-c198-6afd-f26fcd5a9c20@mailbox.tu-dresden.de/

 contrib/credential/libsecret/Makefile   | 7 ++++++-
 contrib/credential/osxkeychain/Makefile | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
Show changes to 2 files +12 −2

contrib/credential/libsecret/Makefile, contrib/credential/osxkeychain/Makefile

diff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile
index 7cacc57..b10cfa3 100644
--- a/contrib/credential/libsecret/Makefile
+++ b/contrib/credential/libsecret/Makefile
@@ -10,6 +10,7 @@
 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 @@
 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
diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile
index c7d9121..5569581 100644
--- a/contrib/credential/osxkeychain/Makefile
+++ b/contrib/credential/osxkeychain/Makefile
@@ -9,6 +9,7 @@

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

 %.o: %.c
@@ -18,7 +19,11 @@
 	$(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

base-commit: 4e98b730f18d59b670ee57b803e5048b9d14b968
-- 
2.47.3

← back to recent threads