From patchwork Sat Oct 13 23:13:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 191316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 77BFD2C008F for ; Sun, 14 Oct 2012 10:14:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5A208A0274; Sat, 13 Oct 2012 23:13:59 +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 1xxMCeORr6zr; Sat, 13 Oct 2012 23:13:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 99AADA01C9; Sat, 13 Oct 2012 23:13:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 55D198F74A for ; Sat, 13 Oct 2012 23:13:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6A2198D4D7 for ; Sat, 13 Oct 2012 23:13:54 +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 1YrPnFxXAqhZ for ; Sat, 13 Oct 2012 23:13:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6CAD18D4D3 for ; Sat, 13 Oct 2012 23:13:53 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1TNAtz-0004Kg-9l for buildroot@busybox.net; Sun, 14 Oct 2012 01:13:51 +0200 Received: from localhost ([127.0.0.1]) by vandecaa-laptop with esmtp (Exim 4.80) (envelope-from ) id 1TNAty-0004Xz-Sp for buildroot@busybox.net; Sun, 14 Oct 2012 01:13:50 +0200 To: buildroot@busybox.net From: "Arnout Vandecappelle \(Essensium/Mind\)" Date: Sun, 14 Oct 2012 01:13:50 +0200 Message-ID: <20121013231350.17317.23758.stgit@localhost> In-Reply-To: <20121013231344.17317.92930.stgit@localhost> References: <20121013231344.17317.92930.stgit@localhost> User-Agent: StGit/0.15 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 01/13] Add BR2_PROJECT_DIR config option X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Arnout Vandecappelle (Essensium/Mind) This option will be used by subsequent patches to set default values for paths. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- Config.in | 13 +++++++++++++ Makefile | 3 +++ 2 files changed, 16 insertions(+) diff --git a/Config.in b/Config.in index dab7787..438964a 100644 --- a/Config.in +++ b/Config.in @@ -16,6 +16,19 @@ config BR2_HOSTARCH source "target/Config.in.arch" +# BR2_DEFCONFIG must be set through two configs, because 'option env=' +# removes it from the .config. +config BR2_PROJECT_DIR_FROM_ENV + string + option env="BR2_PROJECT_DIR" + +config BR2_PROJECT_DIR + string "Project directory" + default BR2_PROJECT_DIR_FROM_ENV + help + This option is used to set defaults for many other configuration + variables. Each one of those can still be overridden individually. + menu "Build options" menu "Commands" diff --git a/Makefile b/Makefile index 0128839..d6136ed 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,8 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include $(CONFIG_DIR)/.config endif +PROJECT_DIR = $(realpath $(call qstrip,$(BR2_PROJECT_DIR))) + # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands ifdef V @@ -557,6 +559,7 @@ COMMON_CONFIG_ENV = \ KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \ KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \ KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \ + BR2_PROJECT_DIR=$(PROJECT_DIR) \ BUILDROOT_CONFIG=$(CONFIG_DIR)/.config xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile