From patchwork Sun Oct 16 11:34:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 682678 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 3sxfQ23jxrz9t10 for ; Sun, 16 Oct 2016 22:34:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=tL8JYIsB; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1E7D0C1E95; Sun, 16 Oct 2016 11:34:47 +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 3Ve-dpJrIZrH; Sun, 16 Oct 2016 11:34:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D7690C1EBA; Sun, 16 Oct 2016 11:34:44 +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 3BC3A1C1569 for ; Sun, 16 Oct 2016 11:34:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 348622DACC for ; Sun, 16 Oct 2016 11:34:42 +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 vqLpBHNQAKgn for ; Sun, 16 Oct 2016 11:34:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by silver.osuosl.org (Postfix) with ESMTPS id 53C592CF92 for ; Sun, 16 Oct 2016 11:34:41 +0000 (UTC) Received: by mail-lf0-f67.google.com with SMTP id l131so18223174lfl.0 for ; Sun, 16 Oct 2016 04:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KuiYIqOmHSEWuC2FgXwOgucuohGVV6ARzGJ6j9pOIEI=; b=tL8JYIsBFmEpX/n6qHYI3d/FYccve04qN5CxzsJuIai37l4i9eCtfaSSUK+PcKXpNj kA0NzPdipprnieROZzv83MhHLbwsPA6HRZ0mzkhEnuynN4AN/xHD77hH8JxvvwReCnPW +WKQAUNYmeO5kkTw23FwaaNQ0G0cHsRP4mZqen1R9PK6J0E8GO7fCve5M2bEM7iKzvCL +MKA2NPD2t7OCz8+nlAJSCR+KvUBymEEnnsM6BTQBMwFarAx9n/9devj5Sg0D1rFjQvt tiEp5UtNkxmI1ObZHOGioXUyATrNok76fE03opUmjRkiaJ45xontQ/MTccUh4VJ20ZJq ZdTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KuiYIqOmHSEWuC2FgXwOgucuohGVV6ARzGJ6j9pOIEI=; b=Ex14TVCLlar/gEAfa7Vhl86JGhmjps/fGikPOx1SkIcgaccrdIRjYU+g5oz7rYYuBX i8lbD7dnZ9cUl/1TOJVNvnIlqkyDG9eW9V5+MxRtim4b4lY4jHXxDgABM8hPgaxGXACW LZnwGc0v7vhrkFHMXbRi04kkmw+Daqt565Sbvq196I+rRfs0JPfCvQw/USV12XT43jZc JcQiQTWvbUxsSLPrwCn1BCfQO72utqNckrxipLAnIrFGF6tNLqqs65Uvh82l5nIYm2c7 O9S+4leKJz40IF/X95wV2O2LmBKqfsB9BBJKI6VY2arOhncGpry164BBQQxd7rz16GN0 JzCA== X-Gm-Message-State: AA6/9Rlb2C6AOQmKTVrLKkQkaibbsKk1U9BP7OgQr+J3XOWrZs2IlqzzFQ0Gs869jIJfgg== X-Received: by 10.194.22.34 with SMTP id a2mr8034706wjf.95.1476617679049; Sun, 16 Oct 2016 04:34:39 -0700 (PDT) Received: from localhost.localdomain ([2001:bf0:c001:30:4a51:b7ff:fed2:2913]) by smtp.gmail.com with ESMTPSA id ct1sm41671647wjd.13.2016.10.16.04.34.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Oct 2016 04:34:38 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Sun, 16 Oct 2016 13:34:29 +0200 Message-Id: <20161016113432.9544-2-s.martin49@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161016113432.9544-1-s.martin49@gmail.com> References: <20161016113432.9544-1-s.martin49@gmail.com> Subject: [Buildroot] [PATCH v10 1/4] core: split variables definition related to in/out-of-tree build from O itself 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 change uncorrolates the CONFIG_DIR and NEED_WRAPPER definition from the presence of the O variable in the command line. Now, the condition used to set these variables is the value of O itself. This change is a preparatory work since the O definition will need to be moved around when we will make Buildroot run with absolute canonical paths for both its root directory and the output location. This will be addressed in a follow-up patch. Signed-off-by: Samuel Martin Tested-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: "Yann E. MORIN" --- changes v9->v10: - update A/R/T tags changes v8->v9: - none changes v7->v8: - new patch --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a860218..2c0ac23 100644 --- a/Makefile +++ b/Makefile @@ -109,10 +109,11 @@ endif # Include some helper macros and variables include support/misc/utils.mk +# Set O variable if not already done on the command line; +# or avoid confusing packages that can use the O= syntax for out-of-tree +# build by preventing it from being forwarded to sub-make calls. ifneq ("$(origin O)", "command line") O := output -CONFIG_DIR := $(TOPDIR) -NEED_WRAPPER = else # other packages might also support Linux-style out of tree builds # with the O= syntax (E.G. BusyBox does). As make automatically @@ -125,9 +126,16 @@ MAKEOVERRIDES = # Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+) # To really make O go away, we have to override it. override O := $(O) -CONFIG_DIR := $(O) # we need to pass O= everywhere we call back into the toplevel makefile EXTRAMAKEARGS = O=$(O) +endif + +# Set variables related to in-tree or out-of-tree build. +ifeq ($(O),output) +CONFIG_DIR := $(TOPDIR) +NEED_WRAPPER = +else +CONFIG_DIR := $(O) NEED_WRAPPER = y endif