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>
This commit is contained in:
Shardul Natu
2026-07-08 03:21:19 +00:00
committed by Junio C Hamano
parent 924dfced6b
commit 1a62c1fc8b
2 changed files with 15 additions and 1 deletions

View File

@@ -1,10 +1,22 @@
include ../config.mak.uname
-include ../config.mak.autogen
-include ../config.mak
ifeq ($(uname_S),Darwin)
OS_CONTRIB += credential/osxkeychain
endif
all::
$(foreach dir,$(OS_CONTRIB),$(MAKE) -C $(dir) $@;)
test::
$(MAKE) -C diff-highlight $@
$(MAKE) -C subtree $@
$(foreach dir,$(OS_CONTRIB),$(MAKE) -C $(dir) $@;)
clean::
$(MAKE) -C contacts $@
$(MAKE) -C diff-highlight $@
$(MAKE) -C subtree $@
$(foreach dir,$(OS_CONTRIB),$(MAKE) -C $(dir) $@;)

View File

@@ -10,4 +10,6 @@ install:
clean:
$(MAKE) -C ../../.. clean-git-credential-osxkeychain
.PHONY: all git-credential-osxkeychain install clean
test: git-credential-osxkeychain
.PHONY: all git-credential-osxkeychain install clean test