contrib: wire up osxkeychain in contrib/Makefile on macOS

When running "make test" with TEST_CONTRIB_TOO=yes (which is default in macOS CI workflows), $(MAKE) -C contrib/ test is invoked. However, contrib/Makefile only invoked tests for diff-highlight and subtree, meaning git-credential-osxkeychain was never built or verified during standard CI test runs. Add a "test" target to contrib/credential/osxkeychain/Makefile that depends on building git-credential-osxkeychain. Additionally, wire up credential/osxkeychain in contrib/Makefile under "all", "test", and "clean" whenever running on macOS (Darwin). This ensures that running "make test" or "make all" in contrib on macOS automatically builds and links git-credential-osxkeychain, preventing future build or symbol linking regressions from slipping through CI. Signed-off-by: Shardul Natu <snatu@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Shardul Natu committed Jul 8, 2026 at 03:21 UTC 1a62c1fc8be2ea7fc8cecde5f31ec83a03c60822
2 files changed +15 -1
contrib/Makefile
+12
@@ -1,10 +1,22 @@
1 +include ../config.mak.uname
2 +-include ../config.mak.autogen
3 +-include ../config.mak
4 +
5 +
6 +ifeq ($(uname_S),Darwin)
7 +OS_CONTRIB += credential/osxkeychain
8 +endif
9 +
10 all::
11 + $(foreach dir,$(OS_CONTRIB),$(MAKE) -C $(dir) $@;)
12
13 test::
14 $(MAKE) -C diff-highlight $@
15 $(MAKE) -C subtree $@
16 + $(foreach dir,$(OS_CONTRIB),$(MAKE) -C $(dir) $@;)
17
18 clean::
19 $(MAKE) -C contacts $@
20 $(MAKE) -C diff-highlight $@
21 $(MAKE) -C subtree $@
22 + $(foreach dir,$(OS_CONTRIB),$(MAKE) -C $(dir) $@;)
contrib/credential/osxkeychain/Makefile
+3 -1
@@ -10,4 +10,6 @@ install:
10 clean:
11 $(MAKE) -C ../../.. clean-git-credential-osxkeychain
12
13 -.PHONY: all git-credential-osxkeychain install clean
13 +test: git-credential-osxkeychain
14 +
15 +.PHONY: all git-credential-osxkeychain install clean test