{"thread":{"id":"64973","subject":"[PATCH] osxkeychain: define build targets in the top-level Makefile.","startedAt":"2026-02-10T18:01:04Z","lastAt":"2026-02-20T01:39:05Z","messageCount":20,"participants":["Koji Nakamaru via GitGitGadget","Junio C Hamano","Koji Nakamaru","D. Ben Knoble","Kristoffer Haugsbakk"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"535692","messageId":"pull.2046.git.1770746461307.gitgitgadget@gmail.com","threadId":"64973","inReplyTo":null,"subject":"[PATCH] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-02-10T18:01:01Z","receivedAt":"2026-02-10T18:01:04Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"From: Koji Nakamaru <koji.nakamaru@gree.net>\n\nThe fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\nincorrectly skipping store operation) introduced linkage with libgit.a,\nand its Makefile was adjusted accordingly. However, the build fails as\nof 864f55e190 because several macOS-specific refinements were applied to\nthe top-level Makefile and config.mak.uname, such as:\n\n  - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n  - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n    2025-12-24)\n  - d281241518 (utf8.c: enable workaround for iconv under macOS 14/15,\n    2026-01-12)\n\nSince libgit.a and its corresponding header files depend on many flags\ndefined in the top-level Makefile, these flags must be consistently\ndefined when building git-credential-osxkeychain. Continuing to manually\nadjust the git-credential-osxkeychain Makefile is cumbersome and\nfragile.\n\nDefine the build targets for git-credential-osxkeychain in the top-level\nMakefile and modify its local Makefile to simply rely on those targets.\n\nSigned-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n---\n    osxkeychain: define build targets in the top-level Makefile.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2046%2FKojiNakamaru%2Ffix%2Fosxkeychain-makefile-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2046\n\n Makefile                                | 17 +++++++\n contrib/credential/osxkeychain/Makefile | 65 +++----------------------\n 2 files changed, 23 insertions(+), 59 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4ac44331ea..97196c6afa 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -4060,3 +4060,20 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n \n contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)\n \t$(AR) $(ARFLAGS) $@ $^\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS\n+\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \\\n+\t\t$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n+\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n+\n+install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain\n+\t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $(INSTALL_STRIP) $< '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\n+.PHONY: clean-git-credential-osxkeychain\n+clean-git-credential-osxkeychain:\n+\t$(RM) \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain.o\ndiff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile\nindex c68445b82d..ddb29f0563 100644\n--- a/contrib/credential/osxkeychain/Makefile\n+++ b/contrib/credential/osxkeychain/Makefile\n@@ -1,66 +1,13 @@\n # The default target of this Makefile is...\n all:: git-credential-osxkeychain\n \n-include ../../../config.mak.uname\n--include ../../../config.mak.autogen\n--include ../../../config.mak\n+git-credential-osxkeychain:\n+\tcd ../../..; make contrib/credential/osxkeychain/git-credential-osxkeychain\n \n-ifdef ZLIB_NG\n-\tBASIC_CFLAGS += -DHAVE_ZLIB_NG\n-        ifdef ZLIB_NG_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_NG_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_NG_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz-ng\n-else\n-        ifdef ZLIB_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz\n-endif\n-ifndef NO_ICONV\n-        ifdef NEEDS_LIBICONV\n-                ifdef ICONVDIR\n-\t\t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\t\tICONV_LINK = $(call libpath_template,$(ICONVDIR)/$(lib))\n-                else\n-\t\t\tICONV_LINK =\n-                endif\n-                ifdef NEEDS_LIBINTL_BEFORE_LIBICONV\n-\t\t\tICONV_LINK += -lintl\n-                endif\n-\t\tEXTLIBS += $(ICONV_LINK) -liconv\n-        endif\n-endif\n-ifndef LIBC_CONTAINS_LIBINTL\n-\tEXTLIBS += -lintl\n-endif\n-\n-prefix ?= /usr/local\n-gitexecdir ?= $(prefix)/libexec/git-core\n-\n-CC ?= gcc\n-CFLAGS ?= -g -O2 -Wall -I../../.. $(BASIC_CFLAGS)\n-LDFLAGS ?= $(BASIC_LDFLAGS) $(EXTLIBS)\n-INSTALL ?= install\n-RM ?= rm -f\n-\n-%.o: %.c\n-\t$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<\n-\n-git-credential-osxkeychain: git-credential-osxkeychain.o ../../../libgit.a\n-\t$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \\\n-\t\t-framework Security -framework CoreFoundation\n-\n-install: git-credential-osxkeychain\n-\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n-\t$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)\n-\n-../../../libgit.a:\n-\tcd ../../..; make libgit.a\n+install:\n+\tcd ../../..; make install-git-credential-osxkeychain\n \n clean:\n-\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n+\tcd ../../..; make clean-git-credential-osxkeychain\n \n-.PHONY: all install clean\n+.PHONY: all git-credential-osxkeychain install clean\n\nbase-commit: 864f55e1906897b630333675a52874c0fec2a45c\n-- \ngitgitgadget\n"},{"id":"535709","messageId":"xmqqpl6cxtr7.fsf@gitster.g","threadId":"64973","inReplyTo":"pull.2046.git.1770746461307.gitgitgadget@gmail.com","subject":"Re: [PATCH] osxkeychain: define build targets in the top-level Makefile.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-10T19:50:52Z","receivedAt":"2026-02-10T19:50:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n>  Makefile                                | 17 +++++++\n>  contrib/credential/osxkeychain/Makefile | 65 +++----------------------\n>  2 files changed, 23 insertions(+), 59 deletions(-)\n\nNice simplification overall.\n\n> diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile\n> index c68445b82d..ddb29f0563 100644\n> --- a/contrib/credential/osxkeychain/Makefile\n> +++ b/contrib/credential/osxkeychain/Makefile\n> @@ -1,66 +1,13 @@\n>  # The default target of this Makefile is...\n>  all:: git-credential-osxkeychain\n>  \n> -include ../../../config.mak.uname\n> --include ../../../config.mak.autogen\n> --include ../../../config.mak\n> +git-credential-osxkeychain:\n> +\tcd ../../..; make contrib/credential/osxkeychain/git-credential-osxkeychain\n\nLet's not write \"make\", but stick to $(MAKE), perhaps like\n\n\t$(MAKE) -C ../../.. contrib/credential/osxkeychain/$@\n\n> +install:\n> +\tcd ../../..; make install-git-credential-osxkeychain\n>  \n>  clean:\n> -\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n> +\tcd ../../..; make clean-git-credential-osxkeychain\n\nLikewise.\n"},{"id":"535724","messageId":"CAOTNsDxjuzWUNp4RGABZmPJZBa3wEBXN79kgNPHZCZYsqiOa3g@mail.gmail.com","threadId":"64973","inReplyTo":"xmqqpl6cxtr7.fsf@gitster.g","subject":"Re: [PATCH] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-10T23:16:13Z","receivedAt":"2026-02-10T23:16:24Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Wed, Feb 11, 2026 at 4:50 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> >  Makefile                                | 17 +++++++\n> >  contrib/credential/osxkeychain/Makefile | 65 +++----------------------\n> >  2 files changed, 23 insertions(+), 59 deletions(-)\n>\n> Nice simplification overall.\n>\n> > diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile\n> > index c68445b82d..ddb29f0563 100644\n> > --- a/contrib/credential/osxkeychain/Makefile\n> > +++ b/contrib/credential/osxkeychain/Makefile\n> > @@ -1,66 +1,13 @@\n> >  # The default target of this Makefile is...\n> >  all:: git-credential-osxkeychain\n> >\n> > -include ../../../config.mak.uname\n> > --include ../../../config.mak.autogen\n> > --include ../../../config.mak\n> > +git-credential-osxkeychain:\n> > +     cd ../../..; make contrib/credential/osxkeychain/git-credential-osxkeychain\n>\n> Let's not write \"make\", but stick to $(MAKE), perhaps like\n>\n>         $(MAKE) -C ../../.. contrib/credential/osxkeychain/$@\n>\n> > +install:\n> > +     cd ../../..; make install-git-credential-osxkeychain\n> >\n> >  clean:\n> > -     $(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n> > +     cd ../../..; make clean-git-credential-osxkeychain\n>\n> Likewise.\n\nThank you for the review. I'll apply these changes and submit the next\niteration soon.\n\n--\nKoji Nakamaru\n"},{"id":"535729","messageId":"pull.2046.v2.git.1770775169908.gitgitgadget@gmail.com","threadId":"64973","inReplyTo":"pull.2046.git.1770746461307.gitgitgadget@gmail.com","subject":"[PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-02-11T01:59:29Z","receivedAt":"2026-02-11T01:59:33Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"From: Koji Nakamaru <koji.nakamaru@gree.net>\n\nThe fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\nincorrectly skipping store operation) introduced linkage with libgit.a,\nand its Makefile was adjusted accordingly. However, the build fails as\nof 864f55e190 because several macOS-specific refinements were applied to\nthe top-level Makefile and config.mak.uname, such as:\n\n  - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n  - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n    2025-12-24)\n  - d281241518 (utf8.c: enable workaround for iconv under macOS 14/15,\n    2026-01-12)\n\nSince libgit.a and its corresponding header files depend on many flags\ndefined in the top-level Makefile, these flags must be consistently\ndefined when building git-credential-osxkeychain. Continuing to manually\nadjust the git-credential-osxkeychain Makefile is cumbersome and\nfragile.\n\nDefine the build targets for git-credential-osxkeychain in the top-level\nMakefile and modify its local Makefile to simply rely on those targets.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n---\n    osxkeychain: define build targets in the top-level Makefile.\n    \n    Changes since v1:\n    \n     * Use $(MAKE) -C to build targets in the top-level Makefile.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2046%2FKojiNakamaru%2Ffix%2Fosxkeychain-makefile-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2046\n\nRange-diff vs v1:\n\n 1:  0aa80d1d17 ! 1:  8c5d75f0c6 osxkeychain: define build targets in the top-level Makefile.\n     @@ Commit message\n          Define the build targets for git-credential-osxkeychain in the top-level\n          Makefile and modify its local Makefile to simply rely on those targets.\n      \n     +    Helped-by: Junio C Hamano <gitster@pobox.com>\n          Signed-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n      \n       ## Makefile ##\n     @@ contrib/credential/osxkeychain/Makefile\n      --include ../../../config.mak.autogen\n      --include ../../../config.mak\n      +git-credential-osxkeychain:\n     -+\tcd ../../..; make contrib/credential/osxkeychain/git-credential-osxkeychain\n     ++\t$(MAKE) -C  ../../.. contrib/credential/osxkeychain/git-credential-osxkeychain\n       \n      -ifdef ZLIB_NG\n      -\tBASIC_CFLAGS += -DHAVE_ZLIB_NG\n     @@ contrib/credential/osxkeychain/Makefile\n      -../../../libgit.a:\n      -\tcd ../../..; make libgit.a\n      +install:\n     -+\tcd ../../..; make install-git-credential-osxkeychain\n     ++\t$(MAKE) -C  ../../.. install-git-credential-osxkeychain\n       \n       clean:\n      -\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n     -+\tcd ../../..; make clean-git-credential-osxkeychain\n     ++\t$(MAKE) -C  ../../.. clean-git-credential-osxkeychain\n       \n      -.PHONY: all install clean\n      +.PHONY: all git-credential-osxkeychain install clean\n\n\n Makefile                                | 17 +++++++\n contrib/credential/osxkeychain/Makefile | 65 +++----------------------\n 2 files changed, 23 insertions(+), 59 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4ac44331ea..97196c6afa 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -4060,3 +4060,20 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n \n contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)\n \t$(AR) $(ARFLAGS) $@ $^\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS\n+\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \\\n+\t\t$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n+\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n+\n+install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain\n+\t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $(INSTALL_STRIP) $< '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\n+.PHONY: clean-git-credential-osxkeychain\n+clean-git-credential-osxkeychain:\n+\t$(RM) \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain.o\ndiff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile\nindex c68445b82d..2044a33f41 100644\n--- a/contrib/credential/osxkeychain/Makefile\n+++ b/contrib/credential/osxkeychain/Makefile\n@@ -1,66 +1,13 @@\n # The default target of this Makefile is...\n all:: git-credential-osxkeychain\n \n-include ../../../config.mak.uname\n--include ../../../config.mak.autogen\n--include ../../../config.mak\n+git-credential-osxkeychain:\n+\t$(MAKE) -C  ../../.. contrib/credential/osxkeychain/git-credential-osxkeychain\n \n-ifdef ZLIB_NG\n-\tBASIC_CFLAGS += -DHAVE_ZLIB_NG\n-        ifdef ZLIB_NG_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_NG_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_NG_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz-ng\n-else\n-        ifdef ZLIB_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz\n-endif\n-ifndef NO_ICONV\n-        ifdef NEEDS_LIBICONV\n-                ifdef ICONVDIR\n-\t\t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\t\tICONV_LINK = $(call libpath_template,$(ICONVDIR)/$(lib))\n-                else\n-\t\t\tICONV_LINK =\n-                endif\n-                ifdef NEEDS_LIBINTL_BEFORE_LIBICONV\n-\t\t\tICONV_LINK += -lintl\n-                endif\n-\t\tEXTLIBS += $(ICONV_LINK) -liconv\n-        endif\n-endif\n-ifndef LIBC_CONTAINS_LIBINTL\n-\tEXTLIBS += -lintl\n-endif\n-\n-prefix ?= /usr/local\n-gitexecdir ?= $(prefix)/libexec/git-core\n-\n-CC ?= gcc\n-CFLAGS ?= -g -O2 -Wall -I../../.. $(BASIC_CFLAGS)\n-LDFLAGS ?= $(BASIC_LDFLAGS) $(EXTLIBS)\n-INSTALL ?= install\n-RM ?= rm -f\n-\n-%.o: %.c\n-\t$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<\n-\n-git-credential-osxkeychain: git-credential-osxkeychain.o ../../../libgit.a\n-\t$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \\\n-\t\t-framework Security -framework CoreFoundation\n-\n-install: git-credential-osxkeychain\n-\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n-\t$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)\n-\n-../../../libgit.a:\n-\tcd ../../..; make libgit.a\n+install:\n+\t$(MAKE) -C  ../../.. install-git-credential-osxkeychain\n \n clean:\n-\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n+\t$(MAKE) -C  ../../.. clean-git-credential-osxkeychain\n \n-.PHONY: all install clean\n+.PHONY: all git-credential-osxkeychain install clean\n\nbase-commit: 864f55e1906897b630333675a52874c0fec2a45c\n-- \ngitgitgadget\n"},{"id":"535777","messageId":"xmqqms1fwasx.fsf@gitster.g","threadId":"64973","inReplyTo":"pull.2046.v2.git.1770775169908.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-11T15:37:50Z","receivedAt":"2026-02-11T15:37:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n>      -+\tcd ../../..; make install-git-credential-osxkeychain\n>      ++\t$(MAKE) -C  ../../.. install-git-credential-osxkeychain\n\nWill replace and mark for 'next'.  Will squash the double spaces\nafter \"-C\" into one while doing so.\n\nThanks.\n"},{"id":"535812","messageId":"CAOTNsDz0ZtdsM8Z2NW0WBMGs8xyWz5ROS6pf8DKQAx26LU4xRA@mail.gmail.com","threadId":"64973","inReplyTo":"xmqqms1fwasx.fsf@gitster.g","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-11T23:06:14Z","receivedAt":"2026-02-11T23:06:27Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Thu, Feb 12, 2026 at 12:37 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> >      -+       cd ../../..; make install-git-credential-osxkeychain\n> >      ++       $(MAKE) -C  ../../.. install-git-credential-osxkeychain\n>\n> Will replace and mark for 'next'.  Will squash the double spaces\n> after \"-C\" into one while doing so.\n\nThank you again for the squash and for marking it for 'next'.\n\n--\nKoji Nakamaru\n"},{"id":"536137","messageId":"CALnO6CARu8HSYh9=z6FAF=84q1qA4Oan7_DLMbcK+1rth8B7cA@mail.gmail.com","threadId":"64973","inReplyTo":"CAOTNsDz0ZtdsM8Z2NW0WBMGs8xyWz5ROS6pf8DKQAx26LU4xRA@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-02-16T23:45:28Z","receivedAt":"2026-02-16T23:45:40Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"On Wed, Feb 11, 2026 at 6:06 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n>\n> On Thu, Feb 12, 2026 at 12:37 AM Junio C Hamano <gitster@pobox.com> wrote:\n> >\n> > \"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> >\n> > >      -+       cd ../../..; make install-git-credential-osxkeychain\n> > >      ++       $(MAKE) -C  ../../.. install-git-credential-osxkeychain\n> >\n> > Will replace and mark for 'next'.  Will squash the double spaces\n> > after \"-C\" into one while doing so.\n>\n> Thank you again for the squash and for marking it for 'next'.\n>\n> --\n> Koji Nakamaru\n>\n\nHomebrew picked this patch on top of 2.53.0, and on a recent build on\nolder macOS I needed to\n\n    mkdir contrib/credential/osxkeychain/.depend\n\nin order to make their build work, since otherwise:\n\n    error: error opening\n'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\nNo such file or directory\n    1 error generated.\n    make[1]: ***\n[contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n\n\n-- \nD. Ben Knoble\n"},{"id":"536139","messageId":"CAOTNsDwMeszCC6wunkkx_vhKYx9OvRWXB4VxedypOTQJ6Qs2sA@mail.gmail.com","threadId":"64973","inReplyTo":"CALnO6CARu8HSYh9=z6FAF=84q1qA4Oan7_DLMbcK+1rth8B7cA@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-17T01:09:33Z","receivedAt":"2026-02-17T01:09:45Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> ...\n>\n> Homebrew picked this patch on top of 2.53.0, and on a recent build on\n> older macOS I needed to\n>\n>     mkdir contrib/credential/osxkeychain/.depend\n>\n> in order to make their build work, since otherwise:\n>\n>     error: error opening\n> 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\n> No such file or directory\n>     1 error generated.\n>     make[1]: ***\n> [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n\nI tried to reproduce this using the current Homebrew formula for git [1]\non macOS 15.7.4 and 14.8.4 (both relatively newer) with the following\nsteps:\n\n  brew tap --force homebrew/core\n  cd \"$(brew --repository homebrew/core)\"\n  git checkout -B main origin/main\n  git pull\n  HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git\n\nIn my environment, the build finished successfully. The patch doesn't\nseem to trigger any issues during a local \"make\" either. How exactly are\nyou performing your build?\n\n[1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb\n"},{"id":"536178","messageId":"CALnO6CCYorpEzmZwLrb7O-ucKLTOCLp6zXxZr0Qv73tOBqKKig@mail.gmail.com","threadId":"64973","inReplyTo":"CAOTNsDwMeszCC6wunkkx_vhKYx9OvRWXB4VxedypOTQJ6Qs2sA@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-02-17T13:10:14Z","receivedAt":"2026-02-17T13:10:26Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"On Mon, Feb 16, 2026 at 8:09 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n>\n> On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > ...\n> >\n> > Homebrew picked this patch on top of 2.53.0, and on a recent build on\n> > older macOS I needed to\n> >\n> >     mkdir contrib/credential/osxkeychain/.depend\n> >\n> > in order to make their build work, since otherwise:\n> >\n> >     error: error opening\n> > 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\n> > No such file or directory\n> >     1 error generated.\n> >     make[1]: ***\n> > [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n>\n> I tried to reproduce this using the current Homebrew formula for git [1]\n> on macOS 15.7.4 and 14.8.4 (both relatively newer) with the following\n> steps:\n>\n>   brew tap --force homebrew/core\n>   cd \"$(brew --repository homebrew/core)\"\n>   git checkout -B main origin/main\n>   git pull\n>   HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git\n>\n> In my environment, the build finished successfully. The patch doesn't\n> seem to trigger any issues during a local \"make\" either. How exactly are\n> you performing your build?\n>\n> [1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb\n\nmacOS 12.7.6 ;) hence tier 3 Homebrew support + all packages build\nfrom source. So just\n\n    brew upgrade git\n\nbuilt 2.53.0 + patches from source. \"brew --version\" says I have\n\"Homebrew 5.0.14-59-g45db1ce\"; it doesn't print a homebrew-core line,\nso I'm not sure off-hand if that includes the core tap version or not\nanymore.\n\nI ended up having to use `brew upgrade --debug git`, fix the build\nerror (\"mkdir …\") and manually perform a few steps when it arose, etc.\n\n-- \nD. Ben Knoble\n"},{"id":"536179","messageId":"CALnO6CCys8hDtSe4=gFjaz7x410TH-7LFGRs0UU5e7XCSWuOQQ@mail.gmail.com","threadId":"64973","inReplyTo":"CALnO6CCYorpEzmZwLrb7O-ucKLTOCLp6zXxZr0Qv73tOBqKKig@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-02-17T13:12:21Z","receivedAt":"2026-02-17T13:12:34Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"On Tue, Feb 17, 2026 at 8:10 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n>\n> On Mon, Feb 16, 2026 at 8:09 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n> >\n> > On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > > ...\n> > >\n> > > Homebrew picked this patch on top of 2.53.0, and on a recent build on\n> > > older macOS I needed to\n> > >\n> > >     mkdir contrib/credential/osxkeychain/.depend\n> > >\n> > > in order to make their build work, since otherwise:\n> > >\n> > >     error: error opening\n> > > 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\n> > > No such file or directory\n> > >     1 error generated.\n> > >     make[1]: ***\n> > > [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n> >\n> > I tried to reproduce this using the current Homebrew formula for git [1]\n> > on macOS 15.7.4 and 14.8.4 (both relatively newer) with the following\n> > steps:\n> >\n> >   brew tap --force homebrew/core\n> >   cd \"$(brew --repository homebrew/core)\"\n> >   git checkout -B main origin/main\n> >   git pull\n> >   HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git\n> >\n> > In my environment, the build finished successfully. The patch doesn't\n> > seem to trigger any issues during a local \"make\" either. How exactly are\n> > you performing your build?\n> >\n> > [1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb\n>\n> macOS 12.7.6 ;) hence tier 3 Homebrew support + all packages build\n> from source. So just\n>\n>     brew upgrade git\n>\n> built 2.53.0 + patches from source. \"brew --version\" says I have\n> \"Homebrew 5.0.14-59-g45db1ce\"; it doesn't print a homebrew-core line,\n> so I'm not sure off-hand if that includes the core tap version or not\n> anymore.\n\nTo rule out differing versions, I also diff'd the Homebrew formula\nfrom GitHub against \"brew edit git\", and the only difference is the\nbottle stanza on GitHub.\n\n> I ended up having to use `brew upgrade --debug git`, fix the build\n> error (\"mkdir …\") and manually perform a few steps when it arose, etc.\n\n-- \nD. Ben Knoble\n"},{"id":"536211","messageId":"CAOTNsDySo-t-qS5+_bm1Z+c_zRKcrS62vVtxURf9bBax0h8DAQ@mail.gmail.com","threadId":"64973","inReplyTo":"CALnO6CCys8hDtSe4=gFjaz7x410TH-7LFGRs0UU5e7XCSWuOQQ@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-17T18:05:38Z","receivedAt":"2026-02-17T18:05:51Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Tue, Feb 17, 2026 at 10:12 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n>\n> On Tue, Feb 17, 2026 at 8:10 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> >\n> > On Mon, Feb 16, 2026 at 8:09 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n> > >\n> > > On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > > > ...\n> > > >\n> > > > Homebrew picked this patch on top of 2.53.0, and on a recent build on\n> > > > older macOS I needed to\n> > > >\n> > > >     mkdir contrib/credential/osxkeychain/.depend\n> > > >\n> > > > in order to make their build work, since otherwise:\n> > > >\n> > > >     error: error opening\n> > > > 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\n> > > > No such file or directory\n> > > >     1 error generated.\n> > > >     make[1]: ***\n> > > > [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n> > >\n> > > I tried to reproduce this using the current Homebrew formula for git [1]\n> > > on macOS 15.7.4 and 14.8.4 (both relatively newer) with the following\n> > > steps:\n> > >\n> > >   brew tap --force homebrew/core\n> > >   cd \"$(brew --repository homebrew/core)\"\n> > >   git checkout -B main origin/main\n> > >   git pull\n> > >   HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git\n> > >\n> > > In my environment, the build finished successfully. The patch doesn't\n> > > seem to trigger any issues during a local \"make\" either. How exactly are\n> > > you performing your build?\n> > >\n> > > [1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb\n> >\n> > macOS 12.7.6 ;) hence tier 3 Homebrew support + all packages build\n> > from source. So just\n> >\n> >     brew upgrade git\n> >\n> > built 2.53.0 + patches from source. \"brew --version\" says I have\n> > \"Homebrew 5.0.14-59-g45db1ce\"; it doesn't print a homebrew-core line,\n> > so I'm not sure off-hand if that includes the core tap version or not\n> > anymore.\n>\n> To rule out differing versions, I also diff'd the Homebrew formula\n> from GitHub against \"brew edit git\", and the only difference is the\n> bottle stanza on GitHub.\n>\n> > I ended up having to use `brew upgrade --debug git`, fix the build\n> > error (\"mkdir …\") and manually perform a few steps when it arose, etc.\n\nThank you for the details. The current Makefile rule performs the\nfollowing to generate dependency files\n\n  contrib/credential/osxkeychain/git-credential-osxkeychain.o:\ncontrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n          $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n\nwhere the compiler implicitly creates\ncontrib/credential/osxkeychain/.depend/ if it doesn't exist. This\nbehavior seems to be supported at least since Apple clang 15.0.0. The\nfollowing should work for older versions of clang that might not support\nthis behavior.\n\n  contrib/credential/osxkeychain/git-credential-osxkeychain.o:\ncontrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n          @mkdir -p contrib/credential/osxkeychain/.depend\n          $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n\nCan you try this modification in your environment? You can confirm\nwhether this works as below.\n\n  git clone https://github.com/git/git.git\n  cd git\n  git checkout v2.53.0\n  curl https://raw.githubusercontent.com/Homebrew/homebrew-core/46d746f92167fd0559af22f4ccb79c9ff35fbe33/Patches/git/2.53.0-osxkeychain-top-level-makefile.patch\n| patch\n\n  # The next should fail in your environment.\n  make contrib/credential/osxkeychain/git-credential-osxkeychain\n\n  # Please edit Makefile as described and try again. This should\n  # succeed.\n  make contrib/credential/osxkeychain/git-credential-osxkeychain\n\n--\nKoji Nakamaru\n"},{"id":"536230","messageId":"CALnO6CAC3Vpdt34fZ0PLjmZOPazU3hDJiPnZy9reoyJJg-zU3A@mail.gmail.com","threadId":"64973","inReplyTo":"CAOTNsDySo-t-qS5+_bm1Z+c_zRKcrS62vVtxURf9bBax0h8DAQ@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-02-17T21:54:14Z","receivedAt":"2026-02-17T21:54:26Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"On Tue, Feb 17, 2026 at 1:05 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n>\n> On Tue, Feb 17, 2026 at 10:12 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> >\n> > On Tue, Feb 17, 2026 at 8:10 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > >\n> > > On Mon, Feb 16, 2026 at 8:09 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n> > > >\n> > > > On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > > > > ...\n> > > > >\n> > > > > Homebrew picked this patch on top of 2.53.0, and on a recent build on\n> > > > > older macOS I needed to\n> > > > >\n> > > > >     mkdir contrib/credential/osxkeychain/.depend\n> > > > >\n> > > > > in order to make their build work, since otherwise:\n> > > > >\n> > > > >     error: error opening\n> > > > > 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\n> > > > > No such file or directory\n> > > > >     1 error generated.\n> > > > >     make[1]: ***\n> > > > > [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n> > > >\n> > > > I tried to reproduce this using the current Homebrew formula for git [1]\n> > > > on macOS 15.7.4 and 14.8.4 (both relatively newer) with the following\n> > > > steps:\n> > > >\n> > > >   brew tap --force homebrew/core\n> > > >   cd \"$(brew --repository homebrew/core)\"\n> > > >   git checkout -B main origin/main\n> > > >   git pull\n> > > >   HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git\n> > > >\n> > > > In my environment, the build finished successfully. The patch doesn't\n> > > > seem to trigger any issues during a local \"make\" either. How exactly are\n> > > > you performing your build?\n> > > >\n> > > > [1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb\n> > >\n> > > macOS 12.7.6 ;) hence tier 3 Homebrew support + all packages build\n> > > from source. So just\n> > >\n> > >     brew upgrade git\n> > >\n> > > built 2.53.0 + patches from source. \"brew --version\" says I have\n> > > \"Homebrew 5.0.14-59-g45db1ce\"; it doesn't print a homebrew-core line,\n> > > so I'm not sure off-hand if that includes the core tap version or not\n> > > anymore.\n> >\n> > To rule out differing versions, I also diff'd the Homebrew formula\n> > from GitHub against \"brew edit git\", and the only difference is the\n> > bottle stanza on GitHub.\n> >\n> > > I ended up having to use `brew upgrade --debug git`, fix the build\n> > > error (\"mkdir …\") and manually perform a few steps when it arose, etc.\n>\n> Thank you for the details. The current Makefile rule performs the\n> following to generate dependency files\n>\n>   contrib/credential/osxkeychain/git-credential-osxkeychain.o:\n> contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n>           $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n> $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n>\n> where the compiler implicitly creates\n> contrib/credential/osxkeychain/.depend/ if it doesn't exist. This\n> behavior seems to be supported at least since Apple clang 15.0.0.\n\nAha! I have clang 13. That probably explains it.\n\n> The\n> following should work for older versions of clang that might not support\n> this behavior.\n>\n>   contrib/credential/osxkeychain/git-credential-osxkeychain.o:\n> contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n>           @mkdir -p contrib/credential/osxkeychain/.depend\n>           $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n> $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n>\n> Can you try this modification in your environment? You can confirm\n> whether this works as below.\n>\n>   git clone https://github.com/git/git.git\n>   cd git\n>   git checkout v2.53.0\n>   curl https://raw.githubusercontent.com/Homebrew/homebrew-core/46d746f92167fd0559af22f4ccb79c9ff35fbe33/Patches/git/2.53.0-osxkeychain-top-level-makefile.patch\n> | patch\n\nUsing git-am worked (patch doesn't apply it)\n\n>   # The next should fail in your environment.\n>   make contrib/credential/osxkeychain/git-credential-osxkeychain\n\nFails as stated.\n\n>   # Please edit Makefile as described and try again. This should\n>   # succeed.\n>   make contrib/credential/osxkeychain/git-credential-osxkeychain\n\nWith the (now obvious!) proposal, indeed succeeds.\n\nThanks!\n\n-- \nD. Ben Knoble\n"},{"id":"536243","messageId":"CAOTNsDwVHNF72A7uobRhArqPzEseuhz_fnt49Si6=gR9Xb_KMQ@mail.gmail.com","threadId":"64973","inReplyTo":"CALnO6CAC3Vpdt34fZ0PLjmZOPazU3hDJiPnZy9reoyJJg-zU3A@mail.gmail.com","subject":"Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-18T04:06:56Z","receivedAt":"2026-02-18T04:07:09Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Wed, Feb 18, 2026 at 6:54 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n>\n> On Tue, Feb 17, 2026 at 1:05 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n> >\n> > On Tue, Feb 17, 2026 at 10:12 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > >\n> > > On Tue, Feb 17, 2026 at 8:10 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > > >\n> > > > On Mon, Feb 16, 2026 at 8:09 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:\n> > > > >\n> > > > > On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:\n> > > > > > ...\n> > > > > >\n> > > > > > Homebrew picked this patch on top of 2.53.0, and on a recent build on\n> > > > > > older macOS I needed to\n> > > > > >\n> > > > > >     mkdir contrib/credential/osxkeychain/.depend\n> > > > > >\n> > > > > > in order to make their build work, since otherwise:\n> > > > > >\n> > > > > >     error: error opening\n> > > > > > 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':\n> > > > > > No such file or directory\n> > > > > >     1 error generated.\n> > > > > >     make[1]: ***\n> > > > > > [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1\n> > > > >\n> > > > > I tried to reproduce this using the current Homebrew formula for git [1]\n> > > > > on macOS 15.7.4 and 14.8.4 (both relatively newer) with the following\n> > > > > steps:\n> > > > >\n> > > > >   brew tap --force homebrew/core\n> > > > >   cd \"$(brew --repository homebrew/core)\"\n> > > > >   git checkout -B main origin/main\n> > > > >   git pull\n> > > > >   HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git\n> > > > >\n> > > > > In my environment, the build finished successfully. The patch doesn't\n> > > > > seem to trigger any issues during a local \"make\" either. How exactly are\n> > > > > you performing your build?\n> > > > >\n> > > > > [1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb\n> > > >\n> > > > macOS 12.7.6 ;) hence tier 3 Homebrew support + all packages build\n> > > > from source. So just\n> > > >\n> > > >     brew upgrade git\n> > > >\n> > > > built 2.53.0 + patches from source. \"brew --version\" says I have\n> > > > \"Homebrew 5.0.14-59-g45db1ce\"; it doesn't print a homebrew-core line,\n> > > > so I'm not sure off-hand if that includes the core tap version or not\n> > > > anymore.\n> > >\n> > > To rule out differing versions, I also diff'd the Homebrew formula\n> > > from GitHub against \"brew edit git\", and the only difference is the\n> > > bottle stanza on GitHub.\n> > >\n> > > > I ended up having to use `brew upgrade --debug git`, fix the build\n> > > > error (\"mkdir …\") and manually perform a few steps when it arose, etc.\n> >\n> > Thank you for the details. The current Makefile rule performs the\n> > following to generate dependency files\n> >\n> >   contrib/credential/osxkeychain/git-credential-osxkeychain.o:\n> > contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n> >           $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n> > $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n> >\n> > where the compiler implicitly creates\n> > contrib/credential/osxkeychain/.depend/ if it doesn't exist. This\n> > behavior seems to be supported at least since Apple clang 15.0.0.\n>\n> Aha! I have clang 13. That probably explains it.\n>\n> > The\n> > following should work for older versions of clang that might not support\n> > this behavior.\n> >\n> >   contrib/credential/osxkeychain/git-credential-osxkeychain.o:\n> > contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n> >           @mkdir -p contrib/credential/osxkeychain/.depend\n> >           $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n> > $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n> >\n> > Can you try this modification in your environment? You can confirm\n> > whether this works as below.\n> >\n> >   git clone https://github.com/git/git.git\n> >   cd git\n> >   git checkout v2.53.0\n> >   curl https://raw.githubusercontent.com/Homebrew/homebrew-core/46d746f92167fd0559af22f4ccb79c9ff35fbe33/Patches/git/2.53.0-osxkeychain-top-level-makefile.patch\n> > | patch\n>\n> Using git-am worked (patch doesn't apply it)\n>\n> >   # The next should fail in your environment.\n> >   make contrib/credential/osxkeychain/git-credential-osxkeychain\n>\n> Fails as stated.\n>\n> >   # Please edit Makefile as described and try again. This should\n> >   # succeed.\n> >   make contrib/credential/osxkeychain/git-credential-osxkeychain\n>\n> With the (now obvious!) proposal, indeed succeeds.\n>\n> Thanks!\n\nThank you for testing the modification. I'll submit an updated patch\nlater and also submit it to homebrew (for the current 2.53.0).\n\n--\nKoji Nakamaru\n"},{"id":"536253","messageId":"pull.2046.v3.git.1771391650713.gitgitgadget@gmail.com","threadId":"64973","inReplyTo":"pull.2046.v2.git.1770775169908.gitgitgadget@gmail.com","subject":"[PATCH v3] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-02-18T05:14:10Z","receivedAt":"2026-02-18T05:14:13Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"From: Koji Nakamaru <koji.nakamaru@gree.net>\n\nThe fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\nincorrectly skipping store operation) introduced linkage with libgit.a,\nand its Makefile was adjusted accordingly. However, the build fails as\nof 864f55e190 because several macOS-specific refinements were applied to\nthe top-level Makefile and config.mak.uname, such as:\n\n  - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n  - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n    2025-12-24)\n  - d281241518 (utf8.c: enable workaround for iconv under macOS 14/15,\n    2026-01-12)\n\nSince libgit.a and its corresponding header files depend on many flags\ndefined in the top-level Makefile, these flags must be consistently\ndefined when building git-credential-osxkeychain. Continuing to manually\nadjust the git-credential-osxkeychain Makefile is cumbersome and\nfragile.\n\nDefine the build targets for git-credential-osxkeychain in the top-level\nMakefile and modify its local Makefile to simply rely on those targets.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nReported-by: D. Ben Knoble <ben.knoble@gmail.com>\nSigned-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n---\n    osxkeychain: define build targets in the top-level Makefile.\n    \n    Changes since v2:\n    \n     * Squash the double spaces after \"-C\" into one white.\n     * Add explicit mkdir -p contrib/credential/osxkeychain/.depend for\n       older versions of clang.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2046%2FKojiNakamaru%2Ffix%2Fosxkeychain-makefile-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/2046\n\nRange-diff vs v2:\n\n 1:  8c5d75f0c6 ! 1:  25a66e1b7d osxkeychain: define build targets in the top-level Makefile.\n     @@ Commit message\n          Makefile and modify its local Makefile to simply rely on those targets.\n      \n          Helped-by: Junio C Hamano <gitster@pobox.com>\n     +    Reported-by: D. Ben Knoble <ben.knoble@gmail.com>\n          Signed-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n      \n       ## Makefile ##\n     @@ Makefile: $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n      +\t\t$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation\n      +\n      +contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n     ++\t@mkdir -p contrib/credential/osxkeychain/.depend\n      +\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n      +\n      +install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain\n     @@ contrib/credential/osxkeychain/Makefile\n      --include ../../../config.mak.autogen\n      --include ../../../config.mak\n      +git-credential-osxkeychain:\n     -+\t$(MAKE) -C  ../../.. contrib/credential/osxkeychain/git-credential-osxkeychain\n     ++\t$(MAKE) -C ../../.. contrib/credential/osxkeychain/git-credential-osxkeychain\n       \n      -ifdef ZLIB_NG\n      -\tBASIC_CFLAGS += -DHAVE_ZLIB_NG\n     @@ contrib/credential/osxkeychain/Makefile\n      -../../../libgit.a:\n      -\tcd ../../..; make libgit.a\n      +install:\n     -+\t$(MAKE) -C  ../../.. install-git-credential-osxkeychain\n     ++\t$(MAKE) -C ../../.. install-git-credential-osxkeychain\n       \n       clean:\n      -\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n     -+\t$(MAKE) -C  ../../.. clean-git-credential-osxkeychain\n     ++\t$(MAKE) -C ../../.. clean-git-credential-osxkeychain\n       \n      -.PHONY: all install clean\n      +.PHONY: all git-credential-osxkeychain install clean\n\n\n Makefile                                | 18 +++++++\n contrib/credential/osxkeychain/Makefile | 65 +++----------------------\n 2 files changed, 24 insertions(+), 59 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4ac44331ea..1c2019a4cb 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -4060,3 +4060,21 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n \n contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)\n \t$(AR) $(ARFLAGS) $@ $^\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS\n+\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \\\n+\t\t$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n+\t@mkdir -p contrib/credential/osxkeychain/.depend\n+\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n+\n+install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain\n+\t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $(INSTALL_STRIP) $< '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\n+.PHONY: clean-git-credential-osxkeychain\n+clean-git-credential-osxkeychain:\n+\t$(RM) \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain.o\ndiff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile\nindex c68445b82d..219b0d7f49 100644\n--- a/contrib/credential/osxkeychain/Makefile\n+++ b/contrib/credential/osxkeychain/Makefile\n@@ -1,66 +1,13 @@\n # The default target of this Makefile is...\n all:: git-credential-osxkeychain\n \n-include ../../../config.mak.uname\n--include ../../../config.mak.autogen\n--include ../../../config.mak\n+git-credential-osxkeychain:\n+\t$(MAKE) -C ../../.. contrib/credential/osxkeychain/git-credential-osxkeychain\n \n-ifdef ZLIB_NG\n-\tBASIC_CFLAGS += -DHAVE_ZLIB_NG\n-        ifdef ZLIB_NG_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_NG_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_NG_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz-ng\n-else\n-        ifdef ZLIB_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz\n-endif\n-ifndef NO_ICONV\n-        ifdef NEEDS_LIBICONV\n-                ifdef ICONVDIR\n-\t\t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\t\tICONV_LINK = $(call libpath_template,$(ICONVDIR)/$(lib))\n-                else\n-\t\t\tICONV_LINK =\n-                endif\n-                ifdef NEEDS_LIBINTL_BEFORE_LIBICONV\n-\t\t\tICONV_LINK += -lintl\n-                endif\n-\t\tEXTLIBS += $(ICONV_LINK) -liconv\n-        endif\n-endif\n-ifndef LIBC_CONTAINS_LIBINTL\n-\tEXTLIBS += -lintl\n-endif\n-\n-prefix ?= /usr/local\n-gitexecdir ?= $(prefix)/libexec/git-core\n-\n-CC ?= gcc\n-CFLAGS ?= -g -O2 -Wall -I../../.. $(BASIC_CFLAGS)\n-LDFLAGS ?= $(BASIC_LDFLAGS) $(EXTLIBS)\n-INSTALL ?= install\n-RM ?= rm -f\n-\n-%.o: %.c\n-\t$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<\n-\n-git-credential-osxkeychain: git-credential-osxkeychain.o ../../../libgit.a\n-\t$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \\\n-\t\t-framework Security -framework CoreFoundation\n-\n-install: git-credential-osxkeychain\n-\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n-\t$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)\n-\n-../../../libgit.a:\n-\tcd ../../..; make libgit.a\n+install:\n+\t$(MAKE) -C ../../.. install-git-credential-osxkeychain\n \n clean:\n-\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n+\t$(MAKE) -C ../../.. clean-git-credential-osxkeychain\n \n-.PHONY: all install clean\n+.PHONY: all git-credential-osxkeychain install clean\n\nbase-commit: 864f55e1906897b630333675a52874c0fec2a45c\n-- \ngitgitgadget\n"},{"id":"536301","messageId":"11a91368-7dc8-4081-bd13-d208126beb7b@app.fastmail.com","threadId":"64973","inReplyTo":"pull.2046.v3.git.1771391650713.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile.","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-02-18T16:09:38Z","receivedAt":"2026-02-18T16:10:00Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Feb 18, 2026, at 06:14, Koji Nakamaru via GitGitGadget wrote:\n> From: Koji Nakamaru <koji.nakamaru@gree.net>\n>\n> The fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\n> incorrectly skipping store operation) introduced linkage with libgit.a,\n\nNitpick: Commit references should have the date:\n\n    4580bcd235 (osxkeychain: avoid incorrectly skipping store operation, 2025-11-14)\n\nLike the rest of the commits you reference here.\n\n> and its Makefile was adjusted accordingly. However, the build fails as\n> of 864f55e190 because several macOS-specific refinements were applied to\n> the top-level Makefile and config.mak.uname, such as:\n>\n>   - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n>   - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n>     2025-12-24)\n>   - d281241518 (utf8.c: enable workaround for iconv under macOS 14/15,\n>     2026-01-12)\n>[snip]\n"},{"id":"536308","messageId":"xmqq7bsa7x78.fsf@gitster.g","threadId":"64973","inReplyTo":"pull.2046.v3.git.1771391650713.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-18T17:55:55Z","receivedAt":"2026-02-18T17:55:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> +contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n> +\t@mkdir -p contrib/credential/osxkeychain/.depend\n> +\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n\nI notice that many other places in the Makefile we seem to use\n$(call mkdir_p_parent_template).  Do we want to do so here, too?\n\nOther than that, looking good.  Thanks for updating.\n"},{"id":"536321","messageId":"CAOTNsDyVqooYkSXv3U-SwAqiSqTnwDCOXpRr9AZjgbv5P=dbqw@mail.gmail.com","threadId":"64973","inReplyTo":"11a91368-7dc8-4081-bd13-d208126beb7b@app.fastmail.com","subject":"Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-18T19:11:40Z","receivedAt":"2026-02-18T19:11:52Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Thu, Feb 19, 2026 at 1:10 AM Kristoffer Haugsbakk\n<kristofferhaugsbakk@fastmail.com> wrote:\n>\n> On Wed, Feb 18, 2026, at 06:14, Koji Nakamaru via GitGitGadget wrote:\n> > From: Koji Nakamaru <koji.nakamaru@gree.net>\n> >\n> > The fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\n> > incorrectly skipping store operation) introduced linkage with libgit.a,\n>\n> Nitpick: Commit references should have the date:\n>\n>     4580bcd235 (osxkeychain: avoid incorrectly skipping store operation, 2025-11-14)\n>\n> Like the rest of the commits you reference here.\n>\n> > and its Makefile was adjusted accordingly. However, the build fails as\n> > of 864f55e190 because several macOS-specific refinements were applied to\n> > the top-level Makefile and config.mak.uname, such as:\n> >\n> >   - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n> >   - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n> >     2025-12-24)\n> >   - d281241518 (utf8.c: enable workaround for iconv under macOS 14/15,\n> >     2026-01-12)\n> >[snip]\n\nI see. I'll fix the commit message in the next reroll.\n\n--\nKoji Nakamaru\n"},{"id":"536322","messageId":"CAOTNsDzwb_k+FDBbfzf7z=X=zGhnhXb902Dx9JFGv_eLjza2tQ@mail.gmail.com","threadId":"64973","inReplyTo":"xmqq7bsa7x78.fsf@gitster.g","subject":"Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2026-02-18T19:14:26Z","receivedAt":"2026-02-18T19:14:38Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Thu, Feb 19, 2026 at 2:55 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Koji Nakamaru via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > +contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n> > +     @mkdir -p contrib/credential/osxkeychain/.depend\n> > +     $(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n>\n> I notice that many other places in the Makefile we seem to use\n> $(call mkdir_p_parent_template).  Do we want to do so here, too?\n>\n> Other than that, looking good.  Thanks for updating.\n\n$(call mkdir_p_parent_tempate) seems to be used for creating the\ntarget's parent directory (e.g., creating\npo/build/locale/bg/LC_MESSAGES/ for\npo/build/locale/bg/LC_MESSAGES/git.mo).\n\nSince .depend directories are handled via dep_dirs in this Makefile,\nhow about the following change for consistency?\n\n  diff --git a/Makefile b/Makefile\n  index 1c2019a4cb..47485004d8 100644\n  --- a/Makefile\n  +++ b/Makefile\n  @@ -2876,6 +2876,10 @@ objects: $(OBJECTS)\n   dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)\n   dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))\n\n  +ifeq ($(uname_S),Darwin)\n  + dep_dirs += $(addsuffix .depend,$(sort $(dir\ncontrib/credential/osxkeychain/git-credential-osxkeychain.o)))\n  +endif\n  +\n   ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes)\n   $(dep_dirs):\n    @mkdir -p $@\n  @@ -4066,7 +4070,6 @@\ncontrib/credential/osxkeychain/git-credential-osxkeychain:\ncontrib/credential/os\n    $(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security\n-framework CoreFoundation\n\n   contrib/credential/osxkeychain/git-credential-osxkeychain.o:\ncontrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n  - @mkdir -p contrib/credential/osxkeychain/.depend\n    $(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n\n   install-git-credential-osxkeychain:\ncontrib/credential/osxkeychain/git-credential-osxkeychain\n\n--\nKoji Nakamaru\n"},{"id":"536414","messageId":"xmqqh5rc7o2z.fsf@gitster.g","threadId":"64973","inReplyTo":"CAOTNsDzwb_k+FDBbfzf7z=X=zGhnhXb902Dx9JFGv_eLjza2tQ@mail.gmail.com","subject":"Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-19T15:25:08Z","receivedAt":"2026-02-19T15:25:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Koji Nakamaru <koji.nakamaru@gree.net> writes:\n\n> Since .depend directories are handled via dep_dirs in this Makefile,\n> how about the following change for consistency?\n\nSounds good.  Thanks for spotting.\n\n>\n>   diff --git a/Makefile b/Makefile\n>   index 1c2019a4cb..47485004d8 100644\n>   --- a/Makefile\n>   +++ b/Makefile\n>   @@ -2876,6 +2876,10 @@ objects: $(OBJECTS)\n>    dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)\n>    dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))\n>\n>   +ifeq ($(uname_S),Darwin)\n>   + dep_dirs += $(addsuffix .depend,$(sort $(dir\n> contrib/credential/osxkeychain/git-credential-osxkeychain.o)))\n>   +endif\n>   +\n>    ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes)\n>    $(dep_dirs):\n>     @mkdir -p $@\n>   @@ -4066,7 +4070,6 @@\n> contrib/credential/osxkeychain/git-credential-osxkeychain:\n> contrib/credential/os\n>     $(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security\n> -framework CoreFoundation\n>\n>    contrib/credential/osxkeychain/git-credential-osxkeychain.o:\n> contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n>   - @mkdir -p contrib/credential/osxkeychain/.depend\n>     $(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args)\n> $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n>\n>    install-git-credential-osxkeychain:\n> contrib/credential/osxkeychain/git-credential-osxkeychain\n>\n> --\n> Koji Nakamaru\n"},{"id":"536449","messageId":"pull.2046.v4.git.1771551540816.gitgitgadget@gmail.com","threadId":"64973","inReplyTo":"pull.2046.v3.git.1771391650713.gitgitgadget@gmail.com","subject":"[PATCH v4] osxkeychain: define build targets in the top-level Makefile.","fromName":"Koji Nakamaru via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-02-20T01:39:00Z","receivedAt":"2026-02-20T01:39:05Z","isPatch":true,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"From: Koji Nakamaru <koji.nakamaru@gree.net>\n\nThe fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\nincorrectly skipping store operation, 2025-11-14) introduced linkage\nwith libgit.a, and its Makefile was adjusted accordingly. However, the\nbuild fails as of 864f55e190 because several macOS-specific refinements\nwere applied to the top-level Makefile and config.mak.uname, such as:\n\n  - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n  - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n    2025-12-24)\n  - d281241518 (utf8.c: enable workaround for iconv under macOS 14/15,\n    2026-01-12)\n\nSince libgit.a and its corresponding header files depend on many flags\ndefined in the top-level Makefile, these flags must be consistently\ndefined when building git-credential-osxkeychain. Continuing to manually\nadjust the git-credential-osxkeychain Makefile is cumbersome and\nfragile.\n\nDefine the build targets for git-credential-osxkeychain in the top-level\nMakefile and modify its local Makefile to simply rely on those targets.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nReported-by: D. Ben Knoble <ben.knoble@gmail.com>\nHelped-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>\nSigned-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n---\n    osxkeychain: define build targets in the top-level Makefile.\n    \n    Changes since v3:\n    \n     * Add missing commit reference date.\n     * Use dep_dirs to create contrib/credential/osxkeychain/.depend.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2046%2FKojiNakamaru%2Ffix%2Fosxkeychain-makefile-v4\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v4\nPull-Request: https://github.com/gitgitgadget/git/pull/2046\n\nRange-diff vs v3:\n\n 1:  25a66e1b7d ! 1:  3c36804348 osxkeychain: define build targets in the top-level Makefile.\n     @@ Commit message\n          osxkeychain: define build targets in the top-level Makefile.\n      \n          The fix for git-credential-osxkeychain in 4580bcd235 (osxkeychain: avoid\n     -    incorrectly skipping store operation) introduced linkage with libgit.a,\n     -    and its Makefile was adjusted accordingly. However, the build fails as\n     -    of 864f55e190 because several macOS-specific refinements were applied to\n     -    the top-level Makefile and config.mak.uname, such as:\n     +    incorrectly skipping store operation, 2025-11-14) introduced linkage\n     +    with libgit.a, and its Makefile was adjusted accordingly. However, the\n     +    build fails as of 864f55e190 because several macOS-specific refinements\n     +    were applied to the top-level Makefile and config.mak.uname, such as:\n      \n            - 363837afe7 (macOS: make Homebrew use configurable, 2025-12-24)\n            - cee341e9dd (macOS: use iconv from Homebrew if needed and present,\n     @@ Commit message\n      \n          Helped-by: Junio C Hamano <gitster@pobox.com>\n          Reported-by: D. Ben Knoble <ben.knoble@gmail.com>\n     +    Helped-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>\n          Signed-off-by: Koji Nakamaru <koji.nakamaru@gree.net>\n      \n       ## Makefile ##\n     +@@ Makefile: objects: $(OBJECTS)\n     + dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)\n     + dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))\n     + \n     ++ifeq ($(uname_S),Darwin)\n     ++\tdep_dirs += $(addsuffix .depend,$(sort $(dir contrib/credential/osxkeychain/git-credential-osxkeychain.o)))\n     ++endif\n     ++\n     + ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes)\n     + $(dep_dirs):\n     + \t@mkdir -p $@\n      @@ Makefile: $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n       \n       contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)\n     @@ Makefile: $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n      +\t\t$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation\n      +\n      +contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n     -+\t@mkdir -p contrib/credential/osxkeychain/.depend\n      +\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n      +\n      +install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain\n\n\n Makefile                                | 21 ++++++++\n contrib/credential/osxkeychain/Makefile | 65 +++----------------------\n 2 files changed, 27 insertions(+), 59 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4ac44331ea..47485004d8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2876,6 +2876,10 @@ objects: $(OBJECTS)\n dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)\n dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))\n \n+ifeq ($(uname_S),Darwin)\n+\tdep_dirs += $(addsuffix .depend,$(sort $(dir contrib/credential/osxkeychain/git-credential-osxkeychain.o)))\n+endif\n+\n ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes)\n $(dep_dirs):\n \t@mkdir -p $@\n@@ -4060,3 +4064,20 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)\n \n contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)\n \t$(AR) $(ARFLAGS) $@ $^\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS\n+\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \\\n+\t\t$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation\n+\n+contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS\n+\t$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n+\n+install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain\n+\t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $(INSTALL_STRIP) $< '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\n+.PHONY: clean-git-credential-osxkeychain\n+clean-git-credential-osxkeychain:\n+\t$(RM) \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain \\\n+\t\tcontrib/credential/osxkeychain/git-credential-osxkeychain.o\ndiff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile\nindex c68445b82d..219b0d7f49 100644\n--- a/contrib/credential/osxkeychain/Makefile\n+++ b/contrib/credential/osxkeychain/Makefile\n@@ -1,66 +1,13 @@\n # The default target of this Makefile is...\n all:: git-credential-osxkeychain\n \n-include ../../../config.mak.uname\n--include ../../../config.mak.autogen\n--include ../../../config.mak\n+git-credential-osxkeychain:\n+\t$(MAKE) -C ../../.. contrib/credential/osxkeychain/git-credential-osxkeychain\n \n-ifdef ZLIB_NG\n-\tBASIC_CFLAGS += -DHAVE_ZLIB_NG\n-        ifdef ZLIB_NG_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_NG_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_NG_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz-ng\n-else\n-        ifdef ZLIB_PATH\n-\t\tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n-\t\tEXTLIBS += $(call libpath_template,$(ZLIB_PATH)/$(lib))\n-        endif\n-\tEXTLIBS += -lz\n-endif\n-ifndef NO_ICONV\n-        ifdef NEEDS_LIBICONV\n-                ifdef ICONVDIR\n-\t\t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\t\tICONV_LINK = $(call libpath_template,$(ICONVDIR)/$(lib))\n-                else\n-\t\t\tICONV_LINK =\n-                endif\n-                ifdef NEEDS_LIBINTL_BEFORE_LIBICONV\n-\t\t\tICONV_LINK += -lintl\n-                endif\n-\t\tEXTLIBS += $(ICONV_LINK) -liconv\n-        endif\n-endif\n-ifndef LIBC_CONTAINS_LIBINTL\n-\tEXTLIBS += -lintl\n-endif\n-\n-prefix ?= /usr/local\n-gitexecdir ?= $(prefix)/libexec/git-core\n-\n-CC ?= gcc\n-CFLAGS ?= -g -O2 -Wall -I../../.. $(BASIC_CFLAGS)\n-LDFLAGS ?= $(BASIC_LDFLAGS) $(EXTLIBS)\n-INSTALL ?= install\n-RM ?= rm -f\n-\n-%.o: %.c\n-\t$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<\n-\n-git-credential-osxkeychain: git-credential-osxkeychain.o ../../../libgit.a\n-\t$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) \\\n-\t\t-framework Security -framework CoreFoundation\n-\n-install: git-credential-osxkeychain\n-\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n-\t$(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir)\n-\n-../../../libgit.a:\n-\tcd ../../..; make libgit.a\n+install:\n+\t$(MAKE) -C ../../.. install-git-credential-osxkeychain\n \n clean:\n-\t$(RM) git-credential-osxkeychain git-credential-osxkeychain.o\n+\t$(MAKE) -C ../../.. clean-git-credential-osxkeychain\n \n-.PHONY: all install clean\n+.PHONY: all git-credential-osxkeychain install clean\n\nbase-commit: 864f55e1906897b630333675a52874c0fec2a45c\n-- \ngitgitgadget\n"}]}