From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 2F6891F953 for ; Mon, 15 Nov 2021 23:40:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348101AbhKOXmj (ORCPT ); Mon, 15 Nov 2021 18:42:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355259AbhKOXkg (ORCPT ); Mon, 15 Nov 2021 18:40:36 -0500 X-Greylist: delayed 2114 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 15 Nov 2021 14:40:28 PST Received: from vuizook.err.no (vuizook.err.no [IPv6:2a02:20c8:2640::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F7D8C079785 for ; Mon, 15 Nov 2021 14:40:25 -0800 (PST) Received: from [2400:4160:1877:2b00:29f9:f15d:e50b:8944] (helo=glandium.org) by vuizook.err.no with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mmkeC-001svl-HC; Mon, 15 Nov 2021 22:40:21 +0000 Received: from glandium by goemon.lan with local (Exim 4.94.2) (envelope-from ) id 1mmke7-009BaT-JA; Tue, 16 Nov 2021 07:40:15 +0900 Date: Tue, 16 Nov 2021 07:40:15 +0900 From: Mike Hommey To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: git@vger.kernel.org, Junio C Hamano , Emily Shaffer , Jeff King , =?utf-8?B?UmVuw6k=?= Scharfe Subject: Re: [PATCH 8/8] hook-list.h: add a generated list of hooks, like config-list.h Message-ID: <20211115224015.vzfevpvptysxzpaa@glandium.org> X-GPG-Fingerprint: 182E 161D 1130 B9FC CD7D B167 E42A A04F A6AA 8C72 References: <20211115220455.xse7mhbwabrheej4@glandium.org> <211115.86k0h9qcf5.gmgdl@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <211115.86k0h9qcf5.gmgdl@evledraar.gmail.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Nov 15, 2021 at 11:26:36PM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Tue, Nov 16 2021, Mike Hommey wrote: > > > On Thu, Sep 23, 2021 at 12:30:03PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> -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-PREFIX > > > > hook-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