Skip to content

Commit 595be20

Browse files
uhlegitster
authored andcommitted
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>
1 parent 4e98b73 commit 595be20

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

contrib/credential/libsecret/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ gitexecdir ?= $(prefix)/libexec/git-core
1010
CC ?= gcc
1111
CFLAGS ?= -g -O2 -Wall
1212
PKG_CONFIG ?= pkg-config
13+
INSTALL ?= install
1314
RM ?= rm -f
1415

1516
INCS:=$(shell $(PKG_CONFIG) --cflags libsecret-1 glib-2.0)
@@ -21,7 +22,11 @@ LIBS:=$(shell $(PKG_CONFIG) --libs libsecret-1 glib-2.0)
2122
git-credential-libsecret: git-credential-libsecret.o
2223
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
2324

25+
install: git-credential-libsecret
26+
$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
27+
$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
28+
2429
clean:
2530
$(RM) git-credential-libsecret git-credential-libsecret.o
2631

27-
.PHONY: all clean
32+
.PHONY: all install clean

contrib/credential/osxkeychain/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ gitexecdir ?= $(prefix)/libexec/git-core
99

1010
CC ?= gcc
1111
CFLAGS ?= -g -O2 -Wall
12+
INSTALL ?= install
1213
RM ?= rm -f
1314

1415
%.o: %.c
@@ -18,7 +19,11 @@ git-credential-osxkeychain: git-credential-osxkeychain.o
1819
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \
1920
-framework Security -framework CoreFoundation
2021

22+
install: git-credential-osxkeychain
23+
$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
24+
$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)
25+
2126
clean:
2227
$(RM) git-credential-osxkeychain git-credential-osxkeychain.o
2328

24-
.PHONY: all clean
29+
.PHONY: all install clean

0 commit comments

Comments
 (0)