From patchwork Thu Apr 30 19:25:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11521335 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B6E215E6 for ; Thu, 30 Apr 2020 19:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 592CA2072A for ; Thu, 30 Apr 2020 19:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588274720; bh=+7YJ0F1f3t1J9sJB435G2DWcTRqHj08byBs/EBxxpUE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=vBdDHbUqnTZcmmxwTYzw2idViRZqLGoA5Gm/vX77oj/MxkVgO4qHvaQzlt751SZEF D3vJs8hcdECUtWzJjTy0gZ4mAqyJa3F7Aze9wQS0/1rYKNAEH8t4fTdwiBKFzTKsgO za5zDkYbwUD4gqtO0QeqwsnznhAUFJZL2E/U4SzY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbgD3TZQ (ORCPT ); Thu, 30 Apr 2020 15:25:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:47066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726272AbgD3TZQ (ORCPT ); Thu, 30 Apr 2020 15:25:16 -0400 Received: from coco.lan (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D8F52072A; Thu, 30 Apr 2020 19:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588274715; bh=+7YJ0F1f3t1J9sJB435G2DWcTRqHj08byBs/EBxxpUE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eLexogwtOcM4N+0UYjECMimdHQ1opWtbze6Dopj5VT/8YNtXib+uDpzQ+/j7L1wM7 gO7qJfjWBGp/EUqclA9T2dFbzn7epFKMoqif+CwAY1rvNnNdS9GaFG/7gci0ZG5mEH gP89jPiJs/LD6qCbcNj9srmmHA07LUSjwbSMf6aM= Date: Thu, 30 Apr 2020 21:25:11 +0200 From: Mauro Carvalho Chehab To: Masahiro Yamada Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Linux Media Mailing List Subject: [PATCH RFC] Kbuild: Makefile: warn if auto.conf is obsolete Message-ID: <20200430212511.2115ed98@coco.lan> In-Reply-To: <20200430211009.3fef03f3@coco.lan> References: <20200430131715.32c1a1f6@coco.lan> <20200430184948.27191975@coco.lan> <20200430211009.3fef03f3@coco.lan> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org A new behavior on more recent kernels require to always call "make modules_prepare" after *any* Kconfig changes. This is not what a poor mortal would be expecting on a building system, as it should, IMHO, be able to detect and auto-run whatever is needed to use the newer setup. Yet, while this is not solved, let's at least stop the build and produce a warning, to notify the user about that. Signed-off-by: Mauro Carvalho Chehab --- I would still prefer to call "make modules_prepare" directly, on such cases, but just calling "make -C . modules_prepare" doesn't work. So, the next best thing would be to at least print a message and don't try to do a build with a broken auto.conf file. Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 70def4907036..492ee2396ab9 100644 --- a/Makefile +++ b/Makefile @@ -1632,6 +1632,11 @@ $(objtree)/Module.symvers: build-dirs := $(KBUILD_EXTMOD) PHONY += modules modules: descend $(objtree)/Module.symvers + @if [ $(KCONFIG_CONFIG) -nt include/config/auto.conf ]; then \ + echo " WARNING: $(KCONFIG_CONFIG) was modified. Need to run:"; \ + echo " $(MAKE) modules_prepare"; \ + exit -1; \ + fi $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost PHONY += modules_install