From nobody Thu Apr 9 21:52:52 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB595361645; Thu, 5 Mar 2026 12:04:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772712254; cv=none; b=CuK0hh2SvEBBC2xrWLeKRth3cuoierTirt696XuAM5loL1QiavAcKe4zbIKzzrjpMAubXE6fRD61hq7bGDH9ReEcGr9voXjGC5oF8dNcdFmN0DrViXCRgkuCTl3z0xU9SJnaqTzDShMoTM6LAQv0/ECLZ94z7J5MGg0WkhJhf14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772712254; c=relaxed/simple; bh=EZ0bFcqL7al2I+rKZeG3J8bdpp80FJ/iXODlj16Vidg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=kK+LDfukp7zVLFQURqcsAmcsi4KKFVyFPZ75sbCWt3uhD8YkOVq/bJySoSLzaz2PqzPg2TGHRGwr+BHgidK5XU6vnJdNKBTaBx3EgOF/BWB2G12JmfbdpJ5RC99SAEZT7X68Qdw50ZLfuut1Xx8HaRCbt2O6Ic9O1I8im4YNUpM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NHueevwg; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=D9LRLmFD; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NHueevwg"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="D9LRLmFD" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772712251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+g2tYa7DLzt/mJnlsOZCvKl2EDHDqccRtsbZb+rgRxs=; b=NHueevwg4HNRatoc2FM90gRbzM29njNShefZhZbA/fTSC3QSytjsQGQ67Y3S0DLwCBtSNE f0mWAHduUuwcGMa2f5a5aowucjj3DBjYYd4EwIrWJ1NVi/Yoe/90I8kX0ZeTdfnSMuvlR4 x2bfsAKHsDKUGtKTXxUDbZgj4Bx0R+yo4K+R1FouBJC3dUPG3yo0HbhCh02rBlSfpzQYsD oocNdE7ZTy9+Qz8o6KwjeudjsFClBbDmNPRQ3gKHJ9H+GY3ZlZKx+b7hJxZ8CJHAq2p34/ 9+R6O22ZQ6AWnhKGe0/6EPiz8sbju+GpMcKg+3/Jf54GOPBNVlwGjOr0QWxE4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772712251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+g2tYa7DLzt/mJnlsOZCvKl2EDHDqccRtsbZb+rgRxs=; b=D9LRLmFDi1Xb4KSGbnHMMzPTS0aSAxjcZATEQbZ5YbW4ekk6g1JMlkeN4EmNmJmXm7+65j md7hWEkX+63TfhCQ== Date: Thu, 05 Mar 2026 13:04:07 +0100 Subject: [PATCH] kbuild: reduce output spam when building out of tree Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260305-kbuild-makefile-spam-v1-1-910f6cf218a1@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/x2M0QpAQBAAf+XaZ1ssEb8iD8ftseHoLlKXf3d5n KaZCIG9cIBORfB8S5DDJSgyBdOi3cwoJjFQTnVORYnreMlmcNcrW9kYw6l3rLghWzctGashpad P8vm3/fC+H1TNFEtmAAAA X-Change-ID: 20260213-kbuild-makefile-spam-4e72f6792dfa To: Nathan Chancellor , Nicolas Schier Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772712251; l=1706; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=EZ0bFcqL7al2I+rKZeG3J8bdpp80FJ/iXODlj16Vidg=; b=9doy78DIV31+wiPQITqADpgH6DS5gYfceFXD7M6g8IradaBSG/Akc4kDR8Hj2wy8msbbkAbLE m78XCdLqoBEDmxHaQOQzHibNt6hH7PH71wyEOO4swelFfIBzAzCYmoA X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The execution of $(call cmd,makefile) will print 'GEN Makefile' on each build, even if the Makefile is not effectively changed. Use a filechk command instead, so a message is only printed on changes. The Makefile is now created even if the build is aborted due to an unclean working tree. That should not make a difference in practice. Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e944c6e71e81..fae52ab03525 100644 --- a/Makefile +++ b/Makefile @@ -676,14 +676,19 @@ print_env_for_makefile =3D \ echo "export KBUILD_OUTPUT =3D $(CURDIR)" endif =20 -quiet_cmd_makefile =3D GEN Makefile - cmd_makefile =3D { \ +filechk_makefile =3D { \ echo "\# Automatically generated by $(abs_srctree)/Makefile: don't edit";= \ $(print_env_for_makefile); \ echo "include $(abs_srctree)/Makefile"; \ - } > Makefile + } =20 -outputmakefile: +$(objtree)/Makefile: FORCE + $(call filechk,makefile) + +# Prevent $(srcroot)/Makefile from inhibiting the rule to run. +PHONY +=3D $(objtree)/Makefile + +outputmakefile: $(objtree)/Makefile ifeq ($(KBUILD_EXTMOD),) @if [ -f $(srctree)/.config -o \ -d $(srctree)/include/config -o \ @@ -704,7 +709,6 @@ else fi endif $(Q)ln -fsn $(srcroot) source - $(call cmd,makefile) $(Q)test -e .gitignore || \ { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20260213-kbuild-makefile-spam-4e72f6792dfa Best regards, --=20 Thomas Wei=C3=9Fschuh