Re: [PATCH 8/8] hook-list.h: add a generated list of hooks, like config-list.h
From: Mike Hommey <hidden>
Date: 2021-11-15 23:39:45
On Mon, Nov 15, 2021 at 11:26:36PM +0100, Ævar Arnfjörð Bjarmason wrote:
On Tue, Nov 16 2021, Mike Hommey wrote:quoted
On Thu, Sep 23, 2021 at 12:30:03PM +0200, Ævar Arnfjörð Bjarmason wrote:quoted
-builtin/help.sp builtin/help.s builtin/help.o: config-list.h GIT-PREFIX +hook.sp hook.s hook.o: hook-list.h + +builtin/help.sp builtin/help.s builtin/help.o: config-list.h hook-list.h GIT-PREFIXhook-list.h is only included from buitin/bugreport.c, so builtin/bugreport.o should be the one with the hook-list.h dependency, shouldn't it?Well spotted, yes. This is a mistake. I think from some earlier WIP version of the series. In practice we don't really miss dependencies due to these sorts of mistakes since we use the .depends files, i.e. GCC & Clang figure this out for us: $ grep hook-list .depend/* */.depend/* builtin/.depend/bugreport.o.d: compat/compiler.h git-compat-util.h hook.h hook-list.h builtin/.depend/bugreport.o.d:hook-list.h:
But aren't those .depends files are only created when compiling object files, such that builtin/.depend/bugreport.o.d wouldn't exist until bugreport.c is compiled, which would fail if hook-list.h wasn't created before that? Mike