From patchwork Mon Apr 27 20:36:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1277947 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.136; helo=silver.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=QKq1O2un; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499xR56g1mz9sPF for ; Tue, 28 Apr 2020 06:37:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5ACE222654; Mon, 27 Apr 2020 20:37:20 +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 02czVQ-8b+nl; Mon, 27 Apr 2020 20:37:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 337BF22253; Mon, 27 Apr 2020 20:37:15 +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 83F981BF29D for ; Mon, 27 Apr 2020 20:37:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7DC852221F for ; Mon, 27 Apr 2020 20:37:09 +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 BjCSWyO-Efzc for ; Mon, 27 Apr 2020 20:37:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by silver.osuosl.org (Postfix) with ESMTPS id B1273226A9 for ; Mon, 27 Apr 2020 20:37:06 +0000 (UTC) Received: by mail-wr1-f47.google.com with SMTP id d17so22149731wrg.11 for ; Mon, 27 Apr 2020 13:37:06 -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=shdF1oq7EazllTeFJrEYDRoTHEVUaHakAukIQPcpPUI=; b=QKq1O2un/Pr/03Ifl64A8O4ieajl7e5ABoxJ+r7JvTyThg/tdXzPsm6Xsm+Z/tMlBI O+POnNqRib6vzXOPuG8v9GAuxzdrRbH13N5y4P3Ul8KGP/Js7CFAZg0idSw1GIQHqSJK EzJRGJ64T5jxss2T4N7j3FVn1bw6/Bq+LWBMs2YrSolyB2yv5yldIAsnWC5EAlUWBYMN TQoBX/e1OP5HvGCEK2SSa/W8kToEIqPNMPP4X+2i1bbow8QnGuQlPSauM8IN9lK3+DIY 04fTMjk7xcogORujEvuzqIeC+V1hRBgGU+PG48sANiWMZGNZURCvtyt1at43P4tZcBbE cY0g== 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=shdF1oq7EazllTeFJrEYDRoTHEVUaHakAukIQPcpPUI=; b=tLPZsMwKh3KrqGJNbtEol1tE/spW9s3JNA6DxBmhgMCYzlETvnxQ2MQpJ3X5nsfn3a vjJYJKXmH6ar5SjxiRA83A1zH9pb6FIJr5saxYQSlchhnguMooNHSpzG6xd0BTPsx/gl FvVkeUH5Cf9W0pSPjh+QXAcN9j8Gg9JeUiYOroiv+WgVJOpoCwTOT9mqhYT9gRY1osDi zbBuQsZy0mCehThoirHXCLciHC0y8sOlJSEyfV4tgJBg1TiRW6PSc+63/YCaRqfusF6C CFrslDPY27mu1vv+V2mfyQBbaQMtt0g1jsYJhW8ofTsFYALaSTDYnDgSW8gbPC4xbGUU oR/g== X-Gm-Message-State: AGi0PuZhCjCKT4fc004ouAgSUNIXbAHACCilm/egiDG4jIJhfdM/rmh+ SQFSatZXNTKhzLji+Z3DON967I9Yb6Y= X-Google-Smtp-Source: APiQypJx4tH/kwyaEZi5d7YEMxXzisH4+0YYZinehEVQcNu2AGvzQI/L6mxQHUTvtGmmVLGJEK8btw== X-Received: by 2002:a05:6000:11cb:: with SMTP id i11mr29916587wrx.339.1588019824745; Mon, 27 Apr 2020 13:37:04 -0700 (PDT) Received: from localhost.localdomain (host185036129193.static.fidoka.tech. [185.36.129.193]) by smtp.gmail.com with ESMTPSA id k14sm22853432wrp.53.2020.04.27.13.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:37:04 -0700 (PDT) From: Angelo Compagnucci X-Google-Original-From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 27 Apr 2020 22:36:56 +0200 Message-Id: <20200427203657.77392-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427203657.77392-1-angelo@amarulasolutions.com> References: <20200427203657.77392-1-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v5 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 7c6e352bde..3ffa8896cb 100644 --- a/package/environment-setup/environment-setup.mk +++ b/package/environment-setup/environment-setup.mk @@ -23,6 +23,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_BIN_DIR_SED_EXP) \ -e $(ENVIRONMENT_SETUP_HOST_DIR_SED_EXP) \ -e $(ENVIRONMENT_SETUP_CROSS_COMPILE_SED_EXP) \