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=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 8FF42C433ED for ; Mon, 17 May 2021 07:04:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 728F86121F for ; Mon, 17 May 2021 07:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235133AbhEQHFS (ORCPT ); Mon, 17 May 2021 03:05:18 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:58552 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234274AbhEQHFO (ORCPT ); Mon, 17 May 2021 03:05:14 -0400 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-10.nifty.com with ESMTP id 14H73Gls004781; Mon, 17 May 2021 16:03:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 14H73Gls004781 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1621234997; bh=vMmG38PneO5iTqzcHq7rhpDey3NYml8eR7BGuT52bjY=; h=From:To:Cc:Subject:Date:From; b=elDDN4ZexyPq0fEt/XubXnL4eyAgT1xE6MVYZCe06mPbTkOp8+yYykSPYYq+9THNW 9Q7NKtml3S4PZDUR5wPYhztNsy9et+vuXvF5YP7fmYPT52ePwMsZ+2rwwvuLMHMDOg MtXXd+IEc7qa/8/KWOK8HZ0b+cbvV4ruu1qIK+VYItGJ9GH3/cTIg0q9sn3aWZSyiQ saYUqSAARPKvwth3I13FIoaLuPwSoHzUpC1hzPikKN5DBpp0a75uuZSA2zMG2laTJ2 3nWGMKmtOY9dTJeZ6wKpLvyNiKfPbdZOOhOVXPQdaGiXfO5sFE3KK8DdSvaTe59dnb snJlKg0h3Ohjw== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] kbuild: merge scripts/mkmakefile to top Makefile Date: Mon, 17 May 2021 16:03:11 +0900 Message-Id: <20210517070314.1428091-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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