From patchwork Tue Aug 27 13:53:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 2850197 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8352BBF546 for ; Tue, 27 Aug 2013 13:54:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DF17204A9 for ; Tue, 27 Aug 2013 13:54:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8599D20488 for ; Tue, 27 Aug 2013 13:53:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408Ab3H0Nx6 (ORCPT ); Tue, 27 Aug 2013 09:53:58 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42634 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062Ab3H0Nx5 (ORCPT ); Tue, 27 Aug 2013 09:53:57 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id ADF1FA5211; Tue, 27 Aug 2013 15:53:56 +0200 (CEST) Received: by sepie.suse.cz (Postfix, from userid 10020) id 9C4837640B; Tue, 27 Aug 2013 15:53:55 +0200 (CEST) From: Michal Marek To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: Do not overwrite include/config/kernel.release needlessly Date: Tue, 27 Aug 2013 15:53:44 +0200 Message-Id: <1377611624-11570-1-git-send-email-mmarek@suse.cz> X-Mailer: git-send-email 1.8.1.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use filechk to detect if the content changed or not. Signed-off-by: Michal Marek --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4e3575c..3aa232f 100644 --- a/Makefile +++ b/Makefile @@ -794,10 +794,13 @@ PHONY += $(vmlinux-dirs) $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ +define filechk_kernel.release + echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" +endef + # Store (new) KERNELRELEASE string in include/config/kernel.release include/config/kernel.release: include/config/auto.conf FORCE - $(Q)rm -f $@ - $(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@ + $(call filechk,kernel.release) # Things we need to do before we recursively start building the kernel