From patchwork Fri Feb 22 07:40:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 158991 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1421369jaa; Thu, 21 Feb 2019 23:40:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IZPEHg9rc0JgHIJnRKj0v5d7+Us3g+aduYRGyv5K/e85m75CpWLkWuTB+WNYvb4PIyRy9hx X-Received: by 2002:a17:902:8b82:: with SMTP id ay2mr2848482plb.64.1550821230107; Thu, 21 Feb 2019 23:40:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550821230; cv=none; d=google.com; s=arc-20160816; b=gfI3HIYLHm64hWm9MBdBEZGEg6H5x2amznl5Wlk59gusN9ABM9ziADBYJybgJb31w1 1t/wSXX0Mxn/HMv1Vpuctf1boFF4c0KkXlV594XDcidzWiLosXlCu0WieLOPv+1y6AZ5 U0MOm5poUN+8CjqmB06SdWWMZff5O8ElrWrNDlwJECn61sHcCiHQYM4te8NRiraNjHVb pvQD/RCHCy2Ob2tpNtFheuN6sO4yYB0QoGZhNGtfpW0+Zpdx97WdMuVWRzUy+gIiLmh6 xX6SFpMgF3ZqT1bCYKJXjiGwCJ/HkiiPdWrXi9mxWPLZ2HQd8H3FiiCrwep+JrDwxdTG rm9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=bMNe7A0okspALkFQtHY95z2jxYuEKE/+Qu2TtqR/cjs=; b=PJXomQy6clTFgUqt//KjvYU8na2F2GPNKCikNgO9ywzkHtRrypfsnSEyD3kjnTN6vf uAqsBvSUAVv+I48XW/LUeW325P8l96bg9WYiw0K5WXclPPd0MRpypaMRU18sBzg9k6wR 2XQz//kE/8Z/x3xVAel5yRkuTgD/j+2vSOtMDjBCM1o9mjhQUsesOBxEFVEh7ouP7P4U /CpEFz/nr6A3sFXAEdmS8m5XQqHWy1nNgnD06CSZ15+beaIDotaw2KXsJwIgqNwmZDpd IxgUFwHKNUuU+VhvdEF30Tzs5AdmiZul6GLZaOeBaKdnlZFe1wUcZ8r6oOs5cgfIoIXx O6XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bZ45tHyA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si740234pfn.124.2019.02.21.23.40.29; Thu, 21 Feb 2019 23:40:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bZ45tHyA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726857AbfBVHk2 (ORCPT + 32 others); Fri, 22 Feb 2019 02:40:28 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:53326 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725944AbfBVHkW (ORCPT ); Fri, 22 Feb 2019 02:40:22 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x1M7eEN5013122; Fri, 22 Feb 2019 16:40:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x1M7eEN5013122 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1550821217; bh=bMNe7A0okspALkFQtHY95z2jxYuEKE/+Qu2TtqR/cjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZ45tHyAiCDn0ZbSCd2ozaFFwvONyLP/yPcxp8Ift+vGhhLkCmnbZTsCaMR4E/m1e Au6K4v4peI6k1ylEtMhZF5DX8L8aRfvuoTulxSDv+IR1ZEI9fri9l7/UB9XsdYNbht eiOq6fs/q7woZuKI1hcnQE9DUN8qJ71SARehfFV+YvCXf2PJDaKw8IZ+NW1N7hw9Wt KKi7RAgi8hTiTPrmINfLaASAC4Jr7aobJ8kcoHYXEMy167/kZngPT6sUytmJN+Bk66 dRof6yoTQC7MWH4WtuDMvFQThYVgEgJTJ74s3vFttUZckyBZQotL7rroQHJMTe/8zi c5Hn3zBODqdsA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] kbuild: move ".config not found!" message from Kconfig to Makefile Date: Fri, 22 Feb 2019 16:40:11 +0900 Message-Id: <1550821211-30324-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550821211-30324-1-git-send-email-yamada.masahiro@socionext.com> References: <1550821211-30324-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If you run "make" in a pristine source tree, currently Kbuild will start to build Kconfig to let it show the error message. It would be more straightforward to check it in Makefile and let it fail immediately. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch Makefile | 10 ++++++++-- scripts/kconfig/conf.c | 13 ------------- 2 files changed, 8 insertions(+), 15 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index aa9ff68..84034c5 100644 --- a/Makefile +++ b/Makefile @@ -628,8 +628,14 @@ ifeq ($(may-sync-config),1) # because some architectures define CROSS_COMPILE there. -include include/config/auto.conf.cmd -# To avoid any implicit rule to kick in, define an empty command -$(KCONFIG_CONFIG): ; +$(KCONFIG_CONFIG): + @echo >&2 '***' + @echo >&2 '*** Configuration file "$@" not found!' + @echo >&2 '***' + @echo >&2 '*** Please run some configurator (e.g. "make oldconfig" or' + @echo >&2 '*** "make menuconfig" or "make xconfig").' + @echo >&2 '***' + @/bin/false # The actual configuration files used during the build are stored in # include/generated/ and include/config/. Update them if .config is newer than diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index da89ef7..ef3678c 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -488,7 +488,6 @@ int main(int ac, char **av) const char *progname = av[0]; int opt; const char *name, *defconfig_file = NULL /* gcc uninit */; - struct stat tmpstat; int no_conf_write = 0; tty_stdio = isatty(0) && isatty(1); @@ -560,18 +559,6 @@ int main(int ac, char **av) name = av[optind]; conf_parse(name); //zconfdump(stdout); - if (sync_kconfig) { - name = conf_get_configname(); - if (stat(name, &tmpstat)) { - fprintf(stderr, "***\n" - "*** Configuration file \"%s\" not found!\n" - "***\n" - "*** Please run some configurator (e.g. \"make oldconfig\" or\n" - "*** \"make menuconfig\" or \"make xconfig\").\n" - "***\n", name); - exit(1); - } - } switch (input_mode) { case defconfig: