From: Koji Nakamaru Date: Wed, 18 Feb 2026 19:14:26 GMT Subject: Re: [PATCH v3] osxkeychain: define build targets in the top-level Makefile. Message-ID: In-Reply-To: On Thu, Feb 19, 2026 at 2:55 AM Junio C Hamano wrote: > > "Koji Nakamaru via GitGitGadget" 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