From patchwork Thu Nov 27 15:38:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 5397081 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 B1CBDC11AC for ; Thu, 27 Nov 2014 15:39:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D07B92017D for ; Thu, 27 Nov 2014 15:39:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4A6A200E0 for ; Thu, 27 Nov 2014 15:39:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbaK0Pij (ORCPT ); Thu, 27 Nov 2014 10:38:39 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40024 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750895AbaK0Pib (ORCPT ); Thu, 27 Nov 2014 10:38:31 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 41C29AC64; Thu, 27 Nov 2014 15:38:29 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id DFFD140857; Thu, 27 Nov 2014 16:38:28 +0100 (CET) From: Michal Marek To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , David Howells Subject: [PATCH] kbuild: Automatically remove stale file Date: Thu, 27 Nov 2014 16:38:09 +0100 Message-Id: <1417102689-19040-1-git-send-email-mmarek@suse.cz> X-Mailer: git-send-email 2.1.2 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 In 3.7, the file moved from include/linux/ to include/generated/uapi/linux/. The path in the #include directive remained the same for compatibility reasons, but this created a problem when bisecting. Commit 9c8cdb71 (kbuild: unconditionally clobber include/linux/version.h on distclean) fixes this, provided the user does make distclean between builds. Better not rely on the user and delete the stale file each time make is invoked. Cc: Paul Gortmaker Cc: David Howells Signed-off-by: Michal Marek --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0032d1c..fc7a6d3 100644 --- a/Makefile +++ b/Makefile @@ -480,6 +480,7 @@ asm-generic: # of make so .config is not included in this case either (for *config). version_h := include/generated/uapi/linux/version.h +old_version_h := include/linux/version.h no-dot-config-targets := clean mrproper distclean \ cscope gtags TAGS tags help %docs check% coccicheck \ @@ -1004,6 +1005,7 @@ endef $(version_h): $(srctree)/Makefile FORCE $(call filechk,version.h) + $(Q)rm -f $(old_version_h) include/generated/utsrelease.h: include/config/kernel.release FORCE $(call filechk,utsrelease.h) @@ -1172,7 +1174,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ signing_key.priv signing_key.x509 x509.genkey \ extra_certificates signing_key.x509.keyid \ - signing_key.x509.signer include/linux/version.h + signing_key.x509.signer # clean - Delete most, but leave enough to build external modules #