Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp2509260ima; Sun, 3 Feb 2019 00:51:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN5dblU/PRQS0n+W7ppF/KEXAThL1BF2bsR8Xnl5HAhDJvQff3wIasa7MVasxW4Po7Kh3fx4 X-Received: by 2002:a17:902:8ec8:: with SMTP id x8mr47343900plo.210.1549183862692; Sun, 03 Feb 2019 00:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549183862; cv=none; d=google.com; s=arc-20160816; b=Ys4HzNXAgV56yp0deW9nvHfFM8JQV/UwXFpFeaNxZiGeCOISEHqXQMc2WAPw9NXuF2 YknRrJhgY+zzu13e0KevTDJd4rRKTPGXD+ftHCaEOdDV9Yoj0RinsoAbdcIO5r6oOq/N 3w8hvmDFjGV2I7WVrOaQJmsnUvLetnOiWn4c/lEA28h+i9Y1WGe5mJmUynw4VwDLGp0p WkNwluixtYByHhZDmEgM2ET5InFShSK8XXk7fq/QF4v6MjCHLHxUp/pXNgr6iqhYqG1L 9UPvBTPLCje20A5UIUPHdptkk93751JTfMBdDO6b+F/cb1++lvOFcmHt9jA+7kIKhCIn V6EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rhRJpHBflXkS4wp22qbcwg142XDHX+aDt7Cofi93mjw=; b=OYDKT5oT/YnkSVXgK6qmTTvKQfw9LPfONJMYgrg5lJQduRDoC1pCjM3S4m73CETrY1 vuAHTVRMl449kYLI99UGiHQoJEMObVHwTjq7Mypmb6pLW2bhRwpgvYEQ5375VBqWOm2g GCjNe+qM93Ztx+muYBVUNFBbJthLVnSz1XHQnfaA/E93gxQADsi1gXC4EZWJkJC1TcIN M134nZiLc+AWDSGDIU23gsO3JTlv78houi+lwwb6ixNz0SlrId53jJ9XuH/rxJI3p2Iq 4SrbWe1Dz5IJKMCMDozN0xrG69XFyKdt5OKGl80f0/+mMha/Xk7VxHJbeoAjHipR3N3o CxPQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si1838964pla.20.2019.02.03.00.50.35; Sun, 03 Feb 2019 00:51:02 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbfBCIt1 (ORCPT + 99 others); Sun, 3 Feb 2019 03:49:27 -0500 Received: from mga02.intel.com ([134.134.136.20]:9690 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbfBCIt1 (ORCPT ); Sun, 3 Feb 2019 03:49:27 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2019 00:49:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,555,1539673200"; d="scan'208";a="112026283" Received: from cvg-ubt08.iil.intel.com ([143.185.152.136]) by orsmga007.jf.intel.com with ESMTP; 03 Feb 2019 00:49:24 -0800 From: Vladimir Kondratiev To: Masahiro Yamada , Michal Marek Cc: Vladimir Kondratiev , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] kbuild: gitignore output directory Date: Sun, 3 Feb 2019 10:48:40 +0200 Message-Id: <20190203084840.6113-1-vladimir.kondratiev@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Kondratiev When compiling into output directory using O=, many files created under KBUILD_OUTPUT that git considers as new ones; git clients, ex. "git gui" lists it, and it clutters file list making it difficult to see what was really changed Generate .gitignore in output directory that ignores all its content Signed-off-by: Vladimir Kondratiev --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 141653226f3c..b1d651e822b1 100644 --- a/Makefile +++ b/Makefile @@ -483,10 +483,13 @@ PHONY += outputmakefile # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. +# At the same time when output Makefile generated, generate .gitignore to +# ignore whole output directory outputmakefile: ifneq ($(KBUILD_SRC),) $(Q)ln -fsn $(srctree) source $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) + $(Q){ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) -- 2.19.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.