git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] osxkeychain: define build targets in the top-level Makefile.

From
Koji Nakamaru <koji.nakamaru@gree.net>
Date
Feb 17, 2026, 18:05 UTC
Message-ID
<CAOTNsDySo-t-qS5+_bm1Z+c_zRKcrS62vVtxURf9bBax0h8DAQ@mail.gmail.com>
In-Reply-To
<CALnO6CCys8hDtSe4=gFjaz7x410TH-7LFGRs0UU5e7XCSWuOQQ@mail.gmail.com>
On Tue, Feb 17, 2026 at 10:12 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:
Show 54 quoted lines
>
> On Tue, Feb 17, 2026 at 8:10 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:
> >
> > On Mon, Feb 16, 2026 at 8:09 PM Koji Nakamaru <koji.nakamaru@gree.net> wrote:
> > >
> > > On Tue, Feb 17, 2026 at 8:45 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:
> > > > ...
> > > >
> > > > Homebrew picked this patch on top of 2.53.0, and on a recent build on
> > > > older macOS I needed to
> > > >
> > > >     mkdir contrib/credential/osxkeychain/.depend
> > > >
> > > > in order to make their build work, since otherwise:
> > > >
> > > >     error: error opening
> > > > 'contrib/credential/osxkeychain/.depend/git-credential-osxkeychain.o.d':
> > > > No such file or directory
> > > >     1 error generated.
> > > >     make[1]: ***
> > > > [contrib/credential/osxkeychain/git-credential-osxkeychain.o] Error 1
> > >
> > > I tried to reproduce this using the current Homebrew formula for git [1]
> > > on macOS 15.7.4 and 14.8.4 (both relatively newer) with the following
> > > steps:
> > >
> > >   brew tap --force homebrew/core
> > >   cd "$(brew --repository homebrew/core)"
> > >   git checkout -B main origin/main
> > >   git pull
> > >   HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall --build-from-source git
> > >
> > > In my environment, the build finished successfully. The patch doesn't
> > > seem to trigger any issues during a local "make" either. How exactly are
> > > you performing your build?
> > >
> > > [1] https://github.com/Homebrew/homebrew-core/blob/9ec3da0dcd3ccd1cd4d892a71377b251770212d7/Formula/g/git.rb
> >
> > macOS 12.7.6 ;) hence tier 3 Homebrew support + all packages build
> > from source. So just
> >
> >     brew upgrade git
> >
> > built 2.53.0 + patches from source. "brew --version" says I have
> > "Homebrew 5.0.14-59-g45db1ce"; it doesn't print a homebrew-core line,
> > so I'm not sure off-hand if that includes the core tap version or not
> > anymore.
>
> To rule out differing versions, I also diff'd the Homebrew formula
> from GitHub against "brew edit git", and the only difference is the
> bottle stanza on GitHub.
>
> > I ended up having to use `brew upgrade --debug git`, fix the build
> > error ("mkdir …") and manually perform a few steps when it arose, etc.

Thank you for the details. The current Makefile rule performs the following to generate dependency files

  contrib/credential/osxkeychain/git-credential-osxkeychain.o:
contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS
          $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)
$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<

where the compiler implicitly creates contrib/credential/osxkeychain/.depend/ if it doesn't exist. This behavior seems to be supported at least since Apple clang 15.0.0. The following should work for older versions of clang that might not support this behavior.

  contrib/credential/osxkeychain/git-credential-osxkeychain.o:
contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS
          @mkdir -p contrib/credential/osxkeychain/.depend
          $(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(compdb_args)
$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<

Can you try this modification in your environment? You can confirm whether this works as below.

  git clone https://github.com/git/git.git
  cd git
  git checkout v2.53.0
  curl https://raw.githubusercontent.com/Homebrew/homebrew-core/46d746f92167fd0559af22f4ccb79c9ff35fbe33/Patches/git/2.53.0-osxkeychain-top-level-makefile.patch
| patch
  # The next should fail in your environment.
  make contrib/credential/osxkeychain/git-credential-osxkeychain
  # Please edit Makefile as described and try again. This should
  # succeed.
  make contrib/credential/osxkeychain/git-credential-osxkeychain

-- Koji Nakamaru

Previous: D. Ben KnobleNext: D. Ben Knoble
Message 11 of 20 in “osxkeychain: define build targets in the top-level Makefile.”
  1. osxkeychain: define build targets in the top-level Makefile.Koji Nakamaru via GitGitGadget, Feb 10, 2026
  2. Junio C HamanoFeb 10, 2026
  3. Koji NakamaruFeb 10, 2026
  4. osxkeychain: define build targets in the top-level Makefile.Koji Nakamaru via GitGitGadget, Feb 11, 2026
  5. Junio C HamanoFeb 11, 2026
  6. Koji NakamaruFeb 11, 2026
  7. D. Ben KnobleFeb 16, 2026
  8. Koji NakamaruFeb 17, 2026
  9. D. Ben KnobleFeb 17, 2026
  10. D. Ben KnobleFeb 17, 2026
  11. Koji NakamaruFeb 17, 2026
  12. D. Ben KnobleFeb 17, 2026
  13. Koji NakamaruFeb 18, 2026
  14. osxkeychain: define build targets in the top-level Makefile.Koji Nakamaru via GitGitGadget, Feb 18, 2026
  15. Kristoffer HaugsbakkFeb 18, 2026
  16. Koji NakamaruFeb 18, 2026
  17. Junio C HamanoFeb 18, 2026
  18. Koji NakamaruFeb 18, 2026
  19. Junio C HamanoFeb 19, 2026
  20. osxkeychain: define build targets in the top-level Makefile.Koji Nakamaru via GitGitGadget, Feb 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.