From patchwork Wed Oct 10 14:44:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Orry X-Patchwork-Id: 981935 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kTNkquVo"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Vcdw61lzz9s7T for ; Thu, 11 Oct 2018 01:57:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7C1E285FFE; Wed, 10 Oct 2018 14:57:37 +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 ebrRNOFhVVWC; Wed, 10 Oct 2018 14:57:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E096785FB9; Wed, 10 Oct 2018 14:57:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9F0681BFE0C for ; Wed, 10 Oct 2018 14:57:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9C81E26798 for ; Wed, 10 Oct 2018 14:57:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ugnuL4A09zeg for ; Wed, 10 Oct 2018 14:57:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by silver.osuosl.org (Postfix) with ESMTPS id D607E221C6 for ; Wed, 10 Oct 2018 14:57:34 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id a8-v6so6088013wmf.1 for ; Wed, 10 Oct 2018 07:57:34 -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:mime-version :content-transfer-encoding; bh=DehLu2BfXRhxtMP0NC24QpP4c1BGx2teT8gIYt66Rhw=; b=kTNkquVoRowykdp780mfHBfcUCbqtc9w9gLOaZjQqe4O6MYbxSp1eRQ7H9GYmYxdAY AQwTAKCipnc65mL3szAjarPqNU7luGM4ILACzzkdamF8qDI0WVmzUOg2gBvoLCEAmSoa ePNxb64+5sia7cuS3L7dkEODJecwQjZWcMAGnJKsRETPZ7B2YOoII+y9Z4Osqg00/w3b DVAgyTws+7A/CAbD0j0y7tuqqYu/OyST97+wQjkFCoz/vPxnzSaSWp2xCODXtJJkpHQW fnwiZ+BxxyGb/yrI4VCsRYKYcSy+9gq1G2TJP55VUrhBfX/lMJMGBGgcto2pNiOgGyud h3cA== 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:mime-version :content-transfer-encoding; bh=DehLu2BfXRhxtMP0NC24QpP4c1BGx2teT8gIYt66Rhw=; b=qeOHx000AWIq3x8djNk5Z+zxia2zhMFnFfl1F3If1dPQYzBBpskZKC5Pd1Yh3zYmp7 Gg2yeijzhIjp3L+x1WOLZru5aLbA4IQ8HYPaxf5VRNrlG8QDx9Jgbxb4tkA536F6erre 35u9xKQVXzyji5lfVmv/EcuAx/6x6dvbmJfWGE91fkIagAImWFBMWcn+HIjsGA0gwV7s ahoEOEGZv1Lzn40I9PdfaxnqqY2UzCXvoDmv1CrKeKExOoVXNzKfgL4BndSdFWYhvtJb DzFJDrenEVp9oRVj6BFSb1sul2FpQs//1EBjhh884ZwZwSaL4gVchMSNbUSv9gSAdkte EqmQ== X-Gm-Message-State: ABuFfog/sNrx7aT3Ri5hvPVAKFaBbnFkxZx2LGJS5tVaOpqKxl+K1o3S jvyI4/+SwiNmiNK2dCpRwM9rji1o X-Google-Smtp-Source: ACcGV61XWlTWTiArVlSRF2I/IOEqUU+Ag9vwaBocn1Gr2HKfIs4l3ZrEpdqpD526lnjf9RzEK4L/Jw== X-Received: by 2002:a1c:6c09:: with SMTP id h9-v6mr1141621wmc.95.1539183453061; Wed, 10 Oct 2018 07:57:33 -0700 (PDT) Received: from arch.schneider-electric.com ([165.225.76.75]) by smtp.gmail.com with ESMTPSA id j6-v6sm16412910wmd.29.2018.10.10.07.57.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 07:57:31 -0700 (PDT) From: Lionel Orry To: buildroot@buildroot.org Date: Wed, 10 Oct 2018 16:44:12 +0200 Message-Id: <20181010144412.3408-1-lionel.orry@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] pkg-waf: add support for _SUBDIR X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lionel Orry Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In the Buildroot manual, it is specified that the Waf-based infrastructure supports the _SUBDIR variable, which was not true. This patch makes use of this variable by changing to the given sub-directory before executing waf commands. Signed-off-by: Lionel Orry --- package/pkg-waf.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk index e5b606f063..826b73291b 100644 --- a/package/pkg-waf.mk +++ b/package/pkg-waf.mk @@ -54,13 +54,15 @@ $(2)_INSTALL_STAGING_OPTS ?= $(2)_INSTALL_TARGET_OPTS ?= $(2)_WAF_OPTS ?= +$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) + # # Configure step. Only define it if not already defined by the package # .mk file. # ifndef $(2)_CONFIGURE_CMDS define $(2)_CONFIGURE_CMDS - cd $$(@D) && \ + cd $$($$(PKG)_SRCDIR) && \ $$(TARGET_CONFIGURE_OPTS) \ $$($(2)_CONF_ENV) \ $$(HOST_DIR)/bin/python2 $$($(2)_WAF) configure \ @@ -77,7 +79,7 @@ endif # ifndef $(2)_BUILD_CMDS define $(2)_BUILD_CMDS - cd $$(@D) && \ + cd $$($$(PKG)_SRCDIR) && \ $$(TARGET_MAKE_ENV) $$(HOST_DIR)/bin/python2 $$($(2)_WAF) \ build -j $$(PARALLEL_JOBS) $$($(2)_BUILD_OPTS) \ $$($(2)_WAF_OPTS) @@ -90,7 +92,7 @@ endif # ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS - cd $$(@D) && \ + cd $$($$(PKG)_SRCDIR) && \ $$(TARGET_MAKE_ENV) $$(HOST_DIR)/bin/python2 $$($(2)_WAF) \ install --destdir=$$(STAGING_DIR) \ $$($(2)_INSTALL_STAGING_OPTS) \ @@ -104,7 +106,7 @@ endif # ifndef $(2)_INSTALL_TARGET_CMDS define $(2)_INSTALL_TARGET_CMDS - cd $$(@D) && \ + cd $$($$(PKG)_SRCDIR) && \ $$(TARGET_MAKE_ENV) $$(HOST_DIR)/bin/python2 $$($(2)_WAF) \ install --destdir=$$(TARGET_DIR) \ $$($(2)_INSTALL_TARGET_OPTS) \