From patchwork Tue May 8 20:40:17 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: 910455 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@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; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rRThSTrW"; 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 40gWb56wKmz9s37 for ; Wed, 9 May 2018 06:40:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 260F988648; Tue, 8 May 2018 20:40:32 +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 rXm2AvD6euL6; Tue, 8 May 2018 20:40:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 94A7488A2F; Tue, 8 May 2018 20:40:31 +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 B56231C26CB for ; Tue, 8 May 2018 20:40:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B2CBE85BAE for ; Tue, 8 May 2018 20:40:26 +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 SXGFxhFlsa1U for ; Tue, 8 May 2018 20:40:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 02B0685AE1 for ; Tue, 8 May 2018 20:40:26 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id j5-v6so23836853wme.5 for ; Tue, 08 May 2018 13:40:25 -0700 (PDT) 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=qB+hLZbpCqFu9FHVurmshzHWQ7X06wheldtsAKjx8Us=; b=rRThSTrWWu8hxoY+vy9cv43Lhpet8BGqCIUOZsCsARUWqMs9Rmm2IW2uoNAa70Q4zF pD7P3KPG/t2I10dD4XjfiRSbcyYvc56Kn2SbgYOxnAWfXy4GxLb7h141ZzEV67TlraBI pddM3koeC+zo1qpANxg0uixWL71JjuII2A8qLyFomagqgRfLsFyss0atUZOcUgB6li4V m1gSaTGl9V/T7yQlqITWOs0H30lwmWDCH0eEPp4C1egnV9QshzbSMDdu6r4NjNXjFKnM aCrWFQlxNcXVSttGQ6Hf0UUM0yvGpRM9YDYfbr5J+euyJtc1CiJO1EnRUnpQmG7R8RqF 6hOQ== 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=qB+hLZbpCqFu9FHVurmshzHWQ7X06wheldtsAKjx8Us=; b=XIecOvoh/4Jt/kKUTMOPKSmxtC9wDN3tJ6qKwLGqaN83tsxfe9dIB52/uU54FRFhMZ pcsyaVA/SqYTd7rv1KUVTgYHcKsqsOyl93TRNDfwLBvBdeXPx4imJPDEYH2BbK5SJuco YaUxNISDcFtmsBKq6Kufo0H5NdjW+fS6bOPwami/KvLWTOpwDxalmEqLnuTKjIUXPdX9 3pC+BYidOtRoIYo75vxN1udQQCeI6oP1NF2rXuSMVmSmHWCKMAcZk1iOEShXEbhq6IIt lXDtlpuLJYWcc0/C2DamVB23SA9fz/GItLPqgKSbzhrPdAV54mNtAlhUshoJKdAwq6JV 3zSQ== X-Gm-Message-State: ALKqPwdfbTEpyjcMasFuTaYFaFjigRchQfMf40WdY6ZryttZ/fpd69eI xdTbh5kC8xi9DddvxEb1iIiuDw== X-Google-Smtp-Source: AB8JxZp6stZVT7h3hGYKkhJ2eIOG/hf/GYv4rNECR0c0kI/qG3pxWr5yl9k1Vkzn5mMPJq78ZEsmGA== X-Received: by 2002:a1c:e58a:: with SMTP id c132-v6mr4074806wmh.23.1525812024291; Tue, 08 May 2018 13:40:24 -0700 (PDT) Received: from scaer.bzh.lan (2a01cb0886107300517c0c28e3b77189.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:517c:c28:e3b7:7189]) by smtp.gmail.com with ESMTPSA id v75-v6sm38772308wrc.65.2018.05.08.13.40.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 13:40:23 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 8 May 2018 22:40:17 +0200 Message-Id: <30f2e071d783a9d6a5312fcb0da773ec091b5095.1525812011.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 4/7 v2] core/package: postpone evaluation of dependency conditions 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: "Yann E. MORIN" , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In the pkg-inner macro, all variables, but he positional arguments, must be $$-prefixed, so that they are expanded only when the macro is evaluated in each package, not when the macro is parsed. It is to be noted, though, that the current code, even though incorrect by the above rules, seemed to work. However, the upcoming addition of download dependencies, mimicking that code, would not work unless it was $$-prefixed. So, for consistency sake, and for correctness sake, let's always use the $$-prefix in the inner macro. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Arnout Vandecappelle --- Changes v1 -> v2: - also fix BR2_{TAR,XZCAT,LZIP}_HOST_DEPENDENCY (Arnout) --- package/pkg-generic.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 8a3b5f90a9..9d1fec396a 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -567,26 +567,26 @@ ifneq ($(1),host-skeleton) $(2)_DEPENDENCIES += host-skeleton endif -ifeq ($(filter host-tar host-skeleton host-fakedate,$(1)),) -$(2)_EXTRACT_DEPENDENCIES += $(BR2_TAR_HOST_DEPENDENCY) +ifeq ($$(filter host-tar host-skeleton host-fakedate,$(1)),) +$(2)_EXTRACT_DEPENDENCIES += $$(BR2_TAR_HOST_DEPENDENCY) endif -ifeq ($(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),) -$(2)_EXTRACT_DEPENDENCIES += $(BR2_XZCAT_HOST_DEPENDENCY) +ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),) +$(2)_EXTRACT_DEPENDENCIES += $$(BR2_XZCAT_HOST_DEPENDENCY) endif -ifeq ($(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),) -$(2)_EXTRACT_DEPENDENCIES += $(BR2_LZIP_HOST_DEPENDENCY) +ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),) +$(2)_EXTRACT_DEPENDENCIES += $$(BR2_LZIP_HOST_DEPENDENCY) endif -ifeq ($(BR2_CCACHE),y) -ifeq ($(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache,$(1)),) +ifeq ($$(BR2_CCACHE),y) +ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache,$(1)),) $(2)_DEPENDENCIES += host-ccache endif endif -ifeq ($(BR2_REPRODUCIBLE),y) -ifeq ($(filter host-skeleton host-fakedate,$(1)),) +ifeq ($$(BR2_REPRODUCIBLE),y) +ifeq ($$(filter host-skeleton host-fakedate,$(1)),) $(2)_DEPENDENCIES += host-fakedate endif endif