From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3C22C4332F for ; Wed, 9 Mar 2022 01:01:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229506AbiCIBCj (ORCPT ); Tue, 8 Mar 2022 20:02:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbiCIBCi (ORCPT ); Tue, 8 Mar 2022 20:02:38 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265E91C9460 for ; Tue, 8 Mar 2022 16:40:19 -0800 (PST) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by gnuweeb.org (Postfix) with ESMTPSA id C747D7E6E3 for ; Wed, 9 Mar 2022 00:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1646785452; bh=y+AGYe4W2NEYGIeCYH0cqaTXwO0QEInpr22w4Kp8DVk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TsEzGaZCx0b7Un3Rq6dAQqXALg6EIFNe/ZzQzOuJzL4CdxtCBjA7WJfxS84ODnutU 8aMQTIWQGT07fJACItO752ixSYxvKWrQprAhLuZd4Eo5ZDVpo+qq1e+1uWP2/fqMZe O3B8p0GJLo+n6ooGvWBuFRHb1xbhFa8HefQrHtlDJE37DcEeXLhTKLVxW1lQuu9BHJ q7bhpaqMrsZJTctJQnbnuSsoiRLjjcX5tW5P7MuCWzhweMljGd9yFpfYvebfcJwQ30 Xc7eRwNYb68h7UUziU/ts1EtIoCRvdZBfiAkiOkj3fx1ZCz3Lm7lOwyT8IwAwn32Ra zM1gGk27BJtFw== Received: by mail-lj1-f175.google.com with SMTP id r22so889247ljd.4 for ; Tue, 08 Mar 2022 16:24:12 -0800 (PST) X-Gm-Message-State: AOAM5324EjIR5/K1/ylFohWJEa79SDu9wcy+JIkwibdqtuR/4lTQQRk6 bpp7Hp8quNK8SjdCxlv5q0HpI+A7WgQvGb5w980= X-Google-Smtp-Source: ABdhPJwAizxZ85f6W/4dPVOGlSmdctbFVQ+eAu+FokRiFZFZBatgKp2VeqLVSRJyRd/MAlnfGMSpqRfV5x+mdErPV6k= X-Received: by 2002:a2e:3013:0:b0:247:ea0d:11e2 with SMTP id w19-20020a2e3013000000b00247ea0d11e2mr6477216ljw.2.1646785450753; Tue, 08 Mar 2022 16:24:10 -0800 (PST) MIME-Version: 1.0 References: <20220308224002.3814225-1-alviro.iskandar@gnuweeb.org> <20220308224002.3814225-3-alviro.iskandar@gnuweeb.org> In-Reply-To: From: Alviro Iskandar Setiawan Date: Wed, 9 Mar 2022 07:23:59 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH liburing 2/2] src/Makefile: Add header files as dependency To: Ammar Faizi Cc: Jens Axboe , Pavel Begunkov , io-uring Mailing list , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Wed, Mar 9, 2022 at 6:06 AM Alviro Iskandar Setiawan wrote: > On Wed, Mar 9, 2022 at 5:52 AM Ammar Faizi wrote: > > This is ugly, it blindly adds all of them to the dependency while > > they're actually not dependencies for all the C files here. For > > example, when compiling for x86, we don't touch aarch64 files. > > > > It is not a problem for liburing at the moment, because we don't > > have many files in the src directory now. But I think we better > > provide a long term solution on this. > > > > For the headers files, I think we should rely on the compilers to > > generate the dependency list with something like: > > > > "-MT ... -MMD -MP -MF" > > > > Then include the generated dependency list to the Makefile. > > > > What do you think? > > Yes, I think it's better to do that. I'll fix this in v2. > thx Sir, I am a bit confused with the include dependency files to the Makefile. I use like this: -MT -MMD -MP -MF the dependency file is generated, but how to include them dynamically? I think it shouldn't be included one by one. So after this [...] -MT "setup.os" -MMD -MP -MF ".deps/setup.os.d" [...] [...] -MT "queue.os" -MMD -MP -MF ".deps/queue.os.d" [...] [...] -MT "register.os" -MMD -MP -MF ".deps/register.os.d" [...] [...] -MT "syscall.os" -MMD -MP -MF ".deps/syscall.os.d" [...] files .deps/{setup,queue,registers,syscall}.os.d are generated, but I have to include them to Makefile right? How to include them all at once? -- Viro