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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEA10C4708A for ; Wed, 26 May 2021 14:30:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF7D5613E6 for ; Wed, 26 May 2021 14:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234810AbhEZObu (ORCPT ); Wed, 26 May 2021 10:31:50 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:26929 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234784AbhEZObr (ORCPT ); Wed, 26 May 2021 10:31:47 -0400 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 14QETuhY000716; Wed, 26 May 2021 23:29:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 14QETuhY000716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1622039397; bh=Thnrv+XalDYjSjKDd9u6a6wg4CcMuXOZDP396r0wnOQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ePKj9eP9poZ3wBZ3CCNlYry53z2yNdQr0F5nezFzaJiUaOo8SLD7WntIaKvdAP4tp Xc2NpbFiJrKjKRWxvqpQG/dbQpc4CTxI7ODZtS72ytOKySryGXSmYc/vizFiG2hdVG TSXvvCAIy4L3e70eYXbpDjuvvRdCtcpseNka16vfunVlOh0ub/QhjT0Eh8GTXlf4Rf wfk1l2rorSmLevps3S92Qs9ElV7LRd+yT2TLSsC9/zYh3WsD/KaI6NrYB8YgenduwU gwPdffapQKAnaChSSPzf23BEXsQP2gdEwoqLKs37gCqgwDvZNgmZhlFFXK4j7kCKoA ft/c0Is/IA3Mw== X-Nifty-SrcIP: [209.85.214.171] Received: by mail-pl1-f171.google.com with SMTP id q16so706108pls.6; Wed, 26 May 2021 07:29:56 -0700 (PDT) X-Gm-Message-State: AOAM531bWtGW08BiHMAzW9lnvEleLYa8CxBKSdo0aaWhqnsTi0yuC7nd ng0E824z+S5k8aIuWRQvfRtZTtosJ5Bxd8ZJ5nE= X-Google-Smtp-Source: ABdhPJwZO8YQvRywk1o60tCH5DNd3+Dw6NQHghfDfWZ12F+UBrn2twW9prxSHTIpl7Yf6mQyV0eg09rkrisu8ocyxfw= X-Received: by 2002:a17:90b:2305:: with SMTP id mt5mr3160729pjb.198.1622039395972; Wed, 26 May 2021 07:29:55 -0700 (PDT) MIME-Version: 1.0 References: <20210517070314.1428091-1-masahiroy@kernel.org> In-Reply-To: <20210517070314.1428091-1-masahiroy@kernel.org> From: Masahiro Yamada Date: Wed, 26 May 2021 23:29:16 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] kbuild: merge scripts/mkmakefile to top Makefile To: Linux Kbuild mailing list Cc: Arnd Bergmann , Michal Marek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 4:03 PM Masahiro Yamada wrote: > > scripts/mkmakefile is simple enough to be merged in the Makefile. > > Use $(call cmd,...) to show the log instead of doing it in the > shell script. > > Signed-off-by: Masahiro Yamada > --- Applied to linux-kbuild. > Makefile | 15 ++++++++++++--- > scripts/mkmakefile | 17 ----------------- > 2 files changed, 12 insertions(+), 20 deletions(-) > delete mode 100755 scripts/mkmakefile > > diff --git a/Makefile b/Makefile > index 15b6476d0f89..50776cc3e894 100644 > --- a/Makefile > +++ b/Makefile > @@ -544,14 +544,24 @@ scripts_basic: > $(Q)rm -f .tmp_quiet_recordmcount > > PHONY += outputmakefile > +ifdef building_out_of_srctree > # Before starting out-of-tree build, make sure the source tree is clean. > # outputmakefile generates a Makefile in the output directory, if using a > # separate output directory. This allows convenient use of make in the > # output directory. > # At the same time when output Makefile generated, generate .gitignore to > # ignore whole output directory > -outputmakefile: > -ifdef building_out_of_srctree > + > +quiet_cmd_makefile = GEN $@ > + cmd_makefile = { \ > + echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \ > + echo "include $(srctree)/Makefile"; \ > + } > $@ > + > +Makefile: FORCE > + $(call cmd,makefile) > + > +outputmakefile: Makefile > $(Q)if [ -f $(srctree)/.config -o \ > -d $(srctree)/include/config -o \ > -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ > @@ -562,7 +572,6 @@ ifdef building_out_of_srctree > false; \ > fi > $(Q)ln -fsn $(srctree) source > - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) > $(Q)test -e .gitignore || \ > { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore > endif > diff --git a/scripts/mkmakefile b/scripts/mkmakefile > deleted file mode 100755 > index 1cb174751429..000000000000 > --- a/scripts/mkmakefile > +++ /dev/null > @@ -1,17 +0,0 @@ > -#!/bin/sh > -# SPDX-License-Identifier: GPL-2.0 > -# Generates a small Makefile used in the root of the output > -# directory, to allow make to be started from there. > -# The Makefile also allow for more convinient build of external modules > - > -# Usage > -# $1 - Kernel src directory > - > -if [ "${quiet}" != "silent_" ]; then > - echo " GEN Makefile" > -fi > - > -cat << EOF > Makefile > -# Automatically generated by $0: don't edit > -include $1/Makefile > -EOF > -- > 2.27.0 > -- Best Regards Masahiro Yamada