From patchwork Sun Jan 14 14:17:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 860443 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uaLZmLvL"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zKJV94YFNz9sRW for ; Mon, 15 Jan 2018 01:17:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B16818819A; Sun, 14 Jan 2018 14:17:50 +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 IagFXWtAknWB; Sun, 14 Jan 2018 14:17:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3DCD6881C7; Sun, 14 Jan 2018 14:17:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 93AD91C14DD for ; Sun, 14 Jan 2018 14:17:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8856F87A86 for ; Sun, 14 Jan 2018 14:17:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WPo8ec0_Mtr3 for ; Sun, 14 Jan 2018 14:17:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4D03287A62 for ; Sun, 14 Jan 2018 14:17:44 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id t74so1506476wme.3 for ; Sun, 14 Jan 2018 06:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=rHb4OgBjbaGqihWrl8sYG0LM7b2KX4J8/Xyj1MaJLwc=; b=uaLZmLvLaWQX9WbvXAyE67csoMgNoUtxbUluv3SCA/XdMIVTiMs+zFGZ7IOkEAwjfw frHEF1jmmqGxIeQFyAFcwPlgnJlxaPbDpSdT/eb4qGo9S14FuMoFwuJ8qagSrvO16pyW P5TBtr3X3+EguPptjQZ+N93sxJeoRgFPl1Gcii1dZwfLWCXjKz5Rrhvx/IoftD0tKKTt XnOX7vZ5+yF2gTV+zwwX/WdNnNHN/AY5OPEjCGrFBQE61ycxK86bG2Opddp5rCMDUY/2 jSfeyQE2HGTpgHKxSVdfwoin6TZmKcrZJmza3Uu/kbCFu2A7KzynvcgwGnGyhdrCHmnc j0qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=rHb4OgBjbaGqihWrl8sYG0LM7b2KX4J8/Xyj1MaJLwc=; b=FTOWaNIf+b++mgA+YEZRAq/+TidMy4WvQ3MF6JImWgncU9iehnGr/vlNI7+K3w5lTZ 5JwVA3GaJIXC1BloqliHl6GaWwO1w3m38/x0mhHUfsDJL0eRDHiRp6qirwFZbrXdxKvt t/DKe6yveIps2IMnulzkPaPR6apr63GQYV4eEkbSsleDLtYZq0M5safj7APuaAdFPgrL LvhmZRxq886yUgJKBfkTBvA99QhHwP57GIu/f7YS2dH//3eLI369CdxXw45EvrvzetxS id74a75KITuD4EvGmo+0TLcjEx9ptURwPtbGDKMEGAEXlQGkR9Ta5AiG3yfqCOR4xyho lVTQ== X-Gm-Message-State: AKwxyte8apH/mxxugw+xDGMToYZLzJyeAYiPVKAdLTB/FRKcie7At78Y 7r+ZBDRZ/MnJLZnaIvx+u57Llw== X-Google-Smtp-Source: ACJfBosb6HpiBzmf/1FTIqsUpsEw3uhxHKsZL1Ufhwkw9dcXzdBeCs9K6fsleBQEmnwFxQbv2jm27A== X-Received: by 10.28.125.19 with SMTP id y19mr7815099wmc.101.1515939462532; Sun, 14 Jan 2018 06:17:42 -0800 (PST) Received: from localhost.localdomain (2a01cb088610730095116638271b1e6e.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:9511:6638:271b:1e6e]) by smtp.gmail.com with ESMTPSA id d63sm3260179wmd.9.2018.01.14.06.17.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jan 2018 06:17:41 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 14 Jan 2018 15:17:02 +0100 Message-Id: <995c1387d0b9a5083d8caaacc8d7e03e93e11c9c.1515939400.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 06/17] core: introduce intermediate BASE_TARGET_DIR variable X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This new BASE_TARGET_DIR variable is set in stone to point to the real location where packages will be installed. Its name is modelled after its definition: it is located in $(BASE_DIR), and it is named 'target/', hence BASE_TARGET_DIR. The already-existing TARGET_DIR variable now simply points to the same location, except that it is recursively expanded, so that we can later change it depending on the context. All locations that really need to reference the existing target/ directory, are changed to use BASE_TARGET_DIR; surprinsigly enough, they all seem to be located in the main Makefile. :-) The rest is left with using good-old TARGET_DIR. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Arnout Vandecappelle --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7d8ab51a8c..756a5be7ed 100644 --- a/Makefile +++ b/Makefile @@ -215,7 +215,8 @@ BR_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf) BUILD_DIR := $(BASE_DIR)/build BINARIES_DIR := $(BASE_DIR)/images -TARGET_DIR := $(BASE_DIR)/target +BASE_TARGET_DIR := $(BASE_DIR)/target +TARGET_DIR = $(BASE_TARGET_DIR) # initial definition so that 'make clean' works for most users, even without # .config. HOST_DIR will be overwritten later when .config is included. HOST_DIR := $(BASE_DIR)/host @@ -237,7 +238,7 @@ LEGAL_REPORT = $(LEGAL_INFO_DIR)/README # dependencies anywhere else # ################################################################################ -$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST): +$(BUILD_DIR) $(BASE_TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST): @mkdir -p $@ BR2_CONFIG = $(CONFIG_DIR)/.config @@ -444,7 +445,7 @@ BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(PATH)" # Location of a file giving a big fat warning that output/target # should not be used as the root filesystem. -TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM +TARGET_DIR_WARNING_FILE = $(BASE_TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM ifeq ($(BR2_CCACHE),y) CCACHE := $(HOST_DIR)/bin/ccache @@ -543,7 +544,7 @@ $(foreach pkg,$(call UPPERCASE,$(PACKAGES)),\ endif .PHONY: dirs -dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ +dirs: $(BUILD_DIR) $(STAGING_DIR) $(BASE_TARGET_DIR) \ $(HOST_DIR) $(HOST_DIR)/usr $(HOST_DIR)/lib $(BINARIES_DIR) $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) @@ -968,7 +969,7 @@ printvars: .PHONY: clean clean: - rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ + rm -rf $(BASE_TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ $(BUILD_DIR) $(BASE_DIR)/staging \ $(LEGAL_INFO_DIR) $(GRAPHS_DIR)