From patchwork Sat Apr 25 12:48:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1276814 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.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.a=rsa-sha256 header.s=20161025 header.b=ZEHynmAj; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 498W7W32jXz9sSW for ; Sat, 25 Apr 2020 22:48:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D8A2F864C5; Sat, 25 Apr 2020 12:48:49 +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 4N5jbHflK4mO; Sat, 25 Apr 2020 12:48:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A6651868E5; Sat, 25 Apr 2020 12:48:48 +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 745E51BF3FD for ; Sat, 25 Apr 2020 12:48:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6D060204CF for ; Sat, 25 Apr 2020 12:48:44 +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 lm8H4CkZAxII for ; Sat, 25 Apr 2020 12:48:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by silver.osuosl.org (Postfix) with ESMTPS id 61024203B9 for ; Sat, 25 Apr 2020 12:48:43 +0000 (UTC) Received: by mail-wm1-f50.google.com with SMTP id x4so14165715wmj.1 for ; Sat, 25 Apr 2020 05:48:43 -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=4UUD/ck+Wf2ajGGR9hYvV8Cgd0Xit40vwhPqgkSYWSU=; b=ZEHynmAjPiN9mRh9WDSanzFWATs9UKB1FsunVESVpMNpAdokK7Y/pCD2P7rR8cq2b9 j0NPziQb3hLP8kj+wtsC8vx/vtsZnbjaGAOamst/YHARp4j1UelS4+nu0on2uvr0eWdr 7+cb9m5gRjaGw6bJKkEkbelt29bxv0z9bc8ugIFwaRvXNSmX/u7gsVabab3zpFm4+1ke coSLmo8zyCF2nULow3+6QQU4xGTKUjW+pcYiaPy78HOcu9dXfwIVdrTMNosTFuUqVPEp zxXIU35ujIdP5jlGQapGoqsLFMFT/0lOfFm5BSK9KuvvKpDcoj+u7wThvSgMaIRKDD5k 3VqQ== 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=4UUD/ck+Wf2ajGGR9hYvV8Cgd0Xit40vwhPqgkSYWSU=; b=FBK1Wa6x9RBTm0yksAq6q1Pbu2VliFcRRgF+fEWi8N9+ppl+yGoucxSj0oEhuQPbsg +KpHdY8Au9OsZTCcxPTjaOCYbYxb6L6BjKKY5bQWntLlUkAv82yHbsIYJOeyJweRkSdi /jCFc/TkiKMI4t1sqag2OU8YfcjCtCmu/oaGMjWgIm3m9aIrjSw8O2M1r/CaDCCAGXzC lEb/mOLKPZ36qQWZ6zLyl62gwKAjJRfNclC43k9NqC2n4brMkz6AMqyiVfH/fb3q+eeG 8eJajg02fDqptOuozs5twiFeBBlNt/SvRjG83M7gAW3RycFORwKntfnfEJ1uQwUeOV3X VKuA== X-Gm-Message-State: AGi0PuZIDheQPWzLiFcTER8PPHoQor6gjNDVz0azJXXYCt61iovAmUSD f9Au2uPLZl8Fa/U7WG94ncnKPTRHLA0= X-Google-Smtp-Source: APiQypLSD4kvg+WRGKEtttRbu6VQ1Cw+xJ4FD/LJJ/zscd7Xfm7QcmShtSAA0VQsMa5hUaUf7ybqJQ== X-Received: by 2002:a7b:c642:: with SMTP id q2mr16502521wmk.41.1587818921463; Sat, 25 Apr 2020 05:48:41 -0700 (PDT) Received: from localhost.localdomain (host185036129193.static.fidoka.tech. [185.36.129.193]) by smtp.gmail.com with ESMTPSA id a187sm7115550wmh.40.2020.04.25.05.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Apr 2020 05:48:40 -0700 (PDT) From: Angelo Compagnucci X-Google-Original-From: Angelo Compagnucci To: buildroot@buildroot.org Date: Sat, 25 Apr 2020 14:48:35 +0200 Message-Id: <20200425124836.122729-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200425124836.122729-1-angelo@amarulasolutions.com> References: <20200425124836.122729-1-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v4 2/3] package/environment-setup: add configure alias 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: Angelo Compagnucci , Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Angelo Compagnucci In order to simplify the usage of a buildroot toolchain within the buildroot shell, a "configure" alias is provided to call ./configure with the correct flags. Signed-off-by: Angelo Compagnucci --- docs/manual/using-buildroot-toolchain.txt | 4 ++-- package/environment-setup/environment-setup | 1 + package/environment-setup/environment-setup.mk | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/manual/using-buildroot-toolchain.txt b/docs/manual/using-buildroot-toolchain.txt index 7b2de4bdfa..187ffd472b 100644 --- a/docs/manual/using-buildroot-toolchain.txt +++ b/docs/manual/using-buildroot-toolchain.txt @@ -31,8 +31,8 @@ For your convenience, by selecting the package BR2_PACKAGE_ENVIRONMENT_SETUP, you can have a +setup-environment+ script installed in +output/host/+. This script can be sourced with +. your/sdk/path/environment-setup+ to launch the buildroot shell. Inside this shell, you will find an environment already -set up with the correct PATH and the complete list of +target configure -options+. +set up with the correct PATH, the complete list of +target configure +options+ and some useful commands. Alternatively, if you just want to prepare the SDK without generating the tarball (e.g. because you will just be moving the +host+ directory, diff --git a/package/environment-setup/environment-setup b/package/environment-setup/environment-setup index b48f1979d6..db652fe090 100644 --- a/package/environment-setup/environment-setup +++ b/package/environment-setup/environment-setup @@ -11,6 +11,7 @@ Some tips: * PATH is now pointing to the HOST_DIR path * Target configure options are already exported * To configure do "./configure $CONFIGURE_FLAGS" +* Alternatively use the alias "configure" EOF SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}")) diff --git a/package/environment-setup/environment-setup.mk b/package/environment-setup/environment-setup.mk index fc74594459..bd74dcb2f4 100644 --- a/package/environment-setup/environment-setup.mk +++ b/package/environment-setup/environment-setup.mk @@ -21,6 +21,8 @@ define ENVIRONMENT_SETUP_INSTALL_TARGET_CMDS --sysconfdir=/etc \ --localstatedir=/var \ --program-prefix=\"\n" >> $(ENVIRONMENT_SETUP_FILE) + printf "alias configure=\"./configure \$${CONFIGURE_FLAGS}\"\n" \ + >> $(ENVIRONMENT_SETUP_FILE) $(SED) $(ENVIRONMENT_SETUP_HOST_DIR_SED_EXP) $(ENVIRONMENT_SETUP_FILE) printf "PS1=\"\[\e[32m\]buildroot-$(BR2_VERSION)\[\e[m\]:\[\e[34m\]\w\[\e[m\]\$$ \"\n" \ >> $(ENVIRONMENT_SETUP_FILE)