From patchwork Tue Jul 4 16:22:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 784176 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x28SQ56HGz9t0j for ; Wed, 5 Jul 2017 02:23:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FurdmWXU"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B318887642; Tue, 4 Jul 2017 16:23:12 +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 mBhro-tum0SO; Tue, 4 Jul 2017 16:23:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 935DD878CC; Tue, 4 Jul 2017 16:22:59 +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 DAF3F1C42BB for ; Tue, 4 Jul 2017 16:22:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4C7D8877C2 for ; Tue, 4 Jul 2017 16:22:31 +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 qEWO9cNxO9cc for ; Tue, 4 Jul 2017 16:22:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 7460F870A1 for ; Tue, 4 Jul 2017 16:22:27 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id 77so47743447wrb.3 for ; Tue, 04 Jul 2017 09:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yk0LgNIuFtVSKW9s659bZtmLV2sr52mpV9oMlp1YEGM=; b=FurdmWXUkNtU2stWef/Nb3stWHMLR/M++IK/IL5kStOuwSK2+PCwBESU6lyBBwlzlk bz9BFmh/OfHGoKcgsmgvZOoW97Mq6QWr8Mce98kj4zl4cXze0BuMqnBX4BqPG73Z/c8z zEB/huT65AXz+icqbxvvUFuMov4ezhpXjxoCLeiO1ig/A+p51bPQJ9aj1xUKjnvtc1qJ iOqqn+5Xw8L1JWd3l6kqKE058MX9sMzyu8d5lR5uOSOZf9CJeJF3tLXbhVRpxvYJZLjP 7vXbnSc+q8z2JBBbx7V6U+lPJz6M0/jV4A+1UEb3Dp1ppj8vkA2tbR88f8gWMEBjSG/R fnHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yk0LgNIuFtVSKW9s659bZtmLV2sr52mpV9oMlp1YEGM=; b=uCV9b5zV1tcBQqmtrzyHtSdQqT/c0HpXu4uCcL1RdvgORD2Z23AFD8TsMeUjrZSUkx cRCfdoFHgDyiXUqXXBkUl8JY2lGJu9TdJThvb2dEoVAP+D39piWkUcqhrSLNDqDoSfvy GuNax9zCE7kmgpXlcuOJtfDMUx+t6TM8nkaEviSPOd0bgBVZNtDVWAVFf87MHO/g3zsr XLSPIxLQu/5xOoitBexl0cR5EfNCHFKHCgKXy0yjb2NsiJbv+2afKnlUYjMTED0m7tEa Aie6e0+WASAHx1zvnnSnq7jRyB/BFYyAWQMt+e7uA69XLyp/GwBHl7RJvPDoZesSIRwb 28vw== X-Gm-Message-State: AKS2vOzrYVcKQHca5SGMJ4CW2NTvHhikMCygvn1o/jsUrioI3VEfTB88 bOB+C4lwwdlW9ws1Woc= X-Received: by 10.223.134.169 with SMTP id 38mr27889778wrx.92.1499185345758; Tue, 04 Jul 2017 09:22:25 -0700 (PDT) Received: from cerise.bzh.lan (2a01cb0886107300297010e522b1c364.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:2970:10e5:22b1:c364]) by smtp.gmail.com with ESMTPSA id u187sm3582012wmd.26.2017.07.04.09.22.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 09:22:25 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Tue, 4 Jul 2017 18:22:08 +0200 Message-Id: <20170704162211.13238-11-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170704162211.13238-1-maxime.hadjinlian@gmail.com> References: <20170704162211.13238-1-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [PATCH 10/13] pkg-generic: introduce _SAME_SOURCE_AS 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" This per package variable can be used to specify that a package shares the same sources as another package. The use case here is for example, you have linux-headers and linux, you don't want to download twice the kernel (because of the introduction of the subdirs in DL_DIR). So you want to specify in linux-headers, this variable, so it will use the linux's source. Signed-off-by: Maxime Hadjinlian --- package/pkg-generic.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 7364551471..a8e0686068 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -434,7 +434,9 @@ endif $(2)_BASE_NAME = $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1)) $(2)_RAW_BASE_NAME = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME)) -$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_RAWNAME) +$(2)_DL_DIR = $$(if $$($(2)_SAME_SOURCE_AS), \ + $$(DL_DIR)/$$($$(call UPPERCASE,$$($(2)_SAME_SOURCE_AS))_RAWNAME), \ + $$(DL_DIR)/$$($(2)_RAWNAME)) $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME) ifndef $(2)_SUBDIR