From patchwork Thu Oct 15 13:24:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gustavo.zacarias@free-electrons.com X-Patchwork-Id: 530703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 676071402B9 for ; Fri, 16 Oct 2015 00:24:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5B7F89208D; Thu, 15 Oct 2015 13:24:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CR+Elc9+zwja; Thu, 15 Oct 2015 13:24:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 88B9F8B3AA; Thu, 15 Oct 2015 13:24:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EDF111BFC0F for ; Thu, 15 Oct 2015 13:24:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E5A4D87CB9 for ; Thu, 15 Oct 2015 13:24:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EGCnf9y6hJpW for ; Thu, 15 Oct 2015 13:24:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.zacarias.com.ar (www.zacarias.com.ar [176.9.42.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 74EFE8F952 for ; Thu, 15 Oct 2015 13:24:55 +0000 (UTC) Received: from asgard (cpe-186-22-136-136.telecentro-reversos.com.ar [186.22.136.136] (may be forged)) (authenticated bits=0) by www.zacarias.com.ar (8.15.1/8.15.1) with ESMTPSA id t9FDOm47001413 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Oct 2015 13:24:51 GMT Received: by asgard (sSMTP sendmail emulation); Thu, 15 Oct 2015 10:24:39 -0300 From: gustavo.zacarias@free-electrons.com To: buildroot@busybox.net Date: Thu, 15 Oct 2015 10:24:39 -0300 Message-Id: <1444915479-7871-1-git-send-email-gustavo.zacarias@free-electrons.com> X-Mailer: git-send-email 2.4.9 X-Virus-Scanned: clamav-milter 0.98.7 at www X-Virus-Status: Clean Cc: Gustavo Zacarias Subject: [Buildroot] [PATCH] ccache: allow for BR2_CCACHE_DIR environment override X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gustavo Zacarias Allow the BR2_CCACHE_DIR .config option to be overriden by the BR2_CCACHE_DIR env variable. This is useful for big projects where in some cases the developers home directory might be a NFS mount (slow) and real production builds aren't. Update documentation accordingly as well. Signed-off-by: Gustavo Zacarias Acked-by: Arnout Vandecappelle (Essensium/Mind) --- Makefile | 6 ++++-- docs/manual/common-usage.txt | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 181d446..5bf1538 100644 --- a/Makefile +++ b/Makefile @@ -183,7 +183,9 @@ endif ifneq ($(BR2_DL_DIR),) DL_DIR := $(BR2_DL_DIR) endif - +ifneq ($(BR2_CCACHE_DIR),) +BR_CACHE_DIR := $(BR2_CCACHE_DIR) +endif # Need that early, before we scan packages # Avoids doing the $(or...) everytime @@ -371,7 +373,7 @@ TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM ifeq ($(BR2_CCACHE),y) CCACHE := $(HOST_DIR)/usr/bin/ccache -BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR)) +BR_CACHE_DIR ?= $(call qstrip,$(BR2_CCACHE_DIR)) export BR_CACHE_DIR HOSTCC := $(CCACHE) $(HOSTCC) HOSTCXX := $(CCACHE) $(HOSTCXX) diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt index 5b27b1f..51b6a3e 100644 --- a/docs/manual/common-usage.txt +++ b/docs/manual/common-usage.txt @@ -84,6 +84,9 @@ to +make+ or set in the environment: configuration interface, so through the Buildroot +.config+ file; this is the recommended way of setting it. + +* +BR2_CCACHE_DIR+ to override the directory where + Buildroot stores the cached files when using ccache. + + * +BR2_DL_DIR+ to override the directory in which Buildroot stores/retrieves downloaded files +