Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile.
- From
Koji Nakamaru <koji.nakamaru@gree.net>
- Date
- Feb 18, 2026, 19:14 UTC
- Message-ID
- <CAOTNsDzwb_k+FDBbfzf7z=X=zGhnhXb902Dx9JFGv_eLjza2tQ@mail.gmail.com>
- In-Reply-To
- <xmqq7bsa7x78.fsf@gitster.g>
On Thu, Feb 19, 2026 at 2:55 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> > "Koji Nakamaru via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > +contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS > > + @mkdir -p contrib/credential/osxkeychain/.depend > > + $(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< > > I notice that many other places in the Makefile we seem to use > $(call mkdir_p_parent_template). Do we want to do so here, too? > > Other than that, looking good. Thanks for updating.
$(call mkdir_p_parent_tempate) seems to be used for creating the target's parent directory (e.g., creating po/build/locale/bg/LC_MESSAGES/ for po/build/locale/bg/LC_MESSAGES/git.mo).
Since .depend directories are handled via dep_dirs in this Makefile, how about the following change for consistency?
diff --git a/Makefile b/Makefile index 1c2019a4cb..47485004d8 100644 --- a/Makefile +++ b/Makefile @@ -2876,6 +2876,10 @@ objects: $(OBJECTS) dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d) dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
+ifeq ($(uname_S),Darwin)
+ dep_dirs += $(addsuffix .depend,$(sort $(dir
contrib/credential/osxkeychain/git-credential-osxkeychain.o)))
+endif
+
ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes)
$(dep_dirs):
@mkdir -p $@
@@ -4066,7 +4070,6 @@
contrib/credential/osxkeychain/git-credential-osxkeychain:
contrib/credential/os
$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security
-framework CoreFoundation contrib/credential/osxkeychain/git-credential-osxkeychain.o:
contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS
- @mkdir -p contrib/credential/osxkeychain/.depend
$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args)
$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<install-git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain
-- Koji Nakamaru