Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5766333imu; Wed, 30 Jan 2019 03:15:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN7A27yvf/4wopqUevSPMlv9qCSZA9F3149Kvt8UbS/UcZuju0haFSBuXM3LjJw0GRV5No4E X-Received: by 2002:aa7:80d7:: with SMTP id a23mr29575672pfn.86.1548846933911; Wed, 30 Jan 2019 03:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548846933; cv=none; d=google.com; s=arc-20160816; b=xsttoUFAukwHGNntC8GeScLLxKnxoKbQZPfsnk+R3Aj/FPW6ixumqre2xP1bSp9sCD 5h1QOwKflUe06bU6wuQfKMH0rzxZ6NXR7TTxzqMkk3TQGE39LXq5TX1+yzTDTVo92gDH w0fPDt2egNLTlxnc1vtOSQsjs4odZGqjrXipUfxL4sMkEqkqh+C9a1GhLMP6pu36SBJz ev878KR/p4PTjFU6oiP1GMEODCifvakQiY1PEaPGKLp5hFb4ZEKf+qAaqfpo8CrtGHD8 1txaGl3P5gAj4EWIxU0Y67E+SJKr7LD1SpfFYBhR5xfECUFir8ykYyR9YHBvadh9Wlnn +7nQ== 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 :message-id:date:subject:cc:to:from; bh=uZVKRVKtHK2kjN98VBtDXHWrtx+5g6oK4ATkWIRuRqg=; b=PdEbbeTDneFTpsmkqfuVnh6VZD4/gJWSr5nr8kBKsNVQ7ukE9csm7Rq9FJQOVFoaRU NUyp5klwetAMltGHfkAtE3a9haR2tfpE5AODYbP7wIoM4lESxDdQygjFwzI1kbzumo3s /tEO0B+L+Ax+Vts79nFUYSYn7gRbfWXt23I3Az5g8DSk6k6MJnYZOQhANa5ObZOQXbxO OFfL6VqPTObn/wCdINjC4jCYTTgDgmtttFcHXvitO9w1qoKZQYtP62Q2chKA6kuDsVVG m9N40gGEVH+jO5WxhJ5LHv0Z9shA+RfCR4H5toDH60ncXhyTACcNT3ylorjlTznnDstz qmqQ== 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 w8si1219344pgm.467.2019.01.30.03.15.17; Wed, 30 Jan 2019 03:15:33 -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 S1727765AbfA3LPN (ORCPT + 99 others); Wed, 30 Jan 2019 06:15:13 -0500 Received: from mga04.intel.com ([192.55.52.120]:11612 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbfA3LPN (ORCPT ); Wed, 30 Jan 2019 06:15:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 03:15:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,540,1539673200"; d="scan'208";a="122532784" Received: from cvg-ubt08.iil.intel.com ([143.185.152.136]) by orsmga003.jf.intel.com with ESMTP; 30 Jan 2019 03:14:58 -0800 From: Vladimir Kondratiev To: Masahiro Yamada , Michal Marek Cc: Vladimir Kondratiev , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: gitignore output directory Date: Wed, 30 Jan 2019 13:14:47 +0200 Message-Id: <20190130111447.26032-1-vladimir.kondratiev@linux.intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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..ee66ea28869b 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) + echo "# this is build directory, ignore it\n*" > .gitignore endif ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) -- 2.19.1