From patchwork Mon Apr 20 21:52:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1273767 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=q2HIRNtg; 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 495gRK5XhCz9sSG for ; Tue, 21 Apr 2020 07:52:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2D69822829; Mon, 20 Apr 2020 21:52:43 +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 bBF0fjofIb8m; Mon, 20 Apr 2020 21:52:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D7AC7220C4; Mon, 20 Apr 2020 21:52:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id DDD3E1BF281 for ; Mon, 20 Apr 2020 21:52:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DA7E1882F3 for ; Mon, 20 Apr 2020 21:52:38 +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 Qb6mvkD-EJAX for ; Mon, 20 Apr 2020 21:52:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by hemlock.osuosl.org (Postfix) with ESMTPS id B2364882F0 for ; Mon, 20 Apr 2020 21:52:37 +0000 (UTC) Received: by mail-wr1-f41.google.com with SMTP id k1so14111414wrx.4 for ; Mon, 20 Apr 2020 14:52:37 -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=qQC9dZPALN5uEUVwjC4vgwJmz4pcSUDGH7CfLiSCAmw=; b=q2HIRNtgei14pW1pXw2L/BVDeJz0dHxGBKmCAu/S5DZE868tS9f4k7lLRVoKd9+/zS 4BDxOe5HTgs/DGkp7VqyILfU1GeG9yZy8xGh/a8i7Ldzmv9CbdLkTCYJhMLvwd8H9rOQ ZQ2IZ+d84icxGcmFOHaiY0k3WXywvQbLksjIm1yiilShA0NLZqUJdw70ZXt3RQS5HYhY hm9Lo7s1VB77L0H8hvukKR99/9v7RCY5Kzz4VZbnuY6/+TOJBcaGuQlrvmweMP6uyqMJ EpP4mALeXTVFU2RqNeVyUcBKVIKC65hw3mHpPRUaB0VQMklbVkBrMJfTK+Mw1IHVLbgj gs+Q== 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=qQC9dZPALN5uEUVwjC4vgwJmz4pcSUDGH7CfLiSCAmw=; b=jZ228qSbVOPSkzKD/SD/9AkuFA7fgyp4mRnx8NWYDc853t3BRErl/TyKkcRW9w167k qX8ACgLyw02QWsHgKTM6zukicTdgPTuix8edkl0cBNjdJj3coR6ua7TY3izTCOEyCbrE UZrS+dAcbiFwEfmKLoO6G2xbICW51mT4C9BWOeGucC1kD2uPfjC1rLb0CycldwGJTDJE LSj4AnrILXzk4wPtWbcgM8TLJWhQUCOgS9iZ0jz7FIlneI/EoeENXNOzCWkMW4RQ6KZa lPvOd0jIUiQWqNmbcrsyIYMDWDT4ne8SRB7phdZizDVr/tzPGBeJWlaHw6J+1weUIVjW E3Pw== X-Gm-Message-State: AGi0PuYAmeWTz+S+ELCAoQ8TH6hmFjUtAAy230u0KbGNpXMI0r22LLQs qNGN056j8l1MSyixbKcnhjwNKN4gDZ0= X-Google-Smtp-Source: APiQypJuZXBD7LgEYTTYfsDDd1hYJ4czhKLWuwM0KDavGrdSu5h/1326wC5Hm7eWyZAhLH8mC8nGMg== X-Received: by 2002:adf:f98e:: with SMTP id f14mr20632896wrr.253.1587419555780; Mon, 20 Apr 2020 14:52:35 -0700 (PDT) Received: from localhost.localdomain (host185100179096.static.fidoka.tech. [185.100.179.96]) by smtp.gmail.com with ESMTPSA id m14sm1007466wrs.76.2020.04.20.14.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 14:52:35 -0700 (PDT) From: Angelo Compagnucci X-Google-Original-From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 20 Apr 2020 23:52:27 +0200 Message-Id: <20200420215228.16175-3-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420215228.16175-1-angelo@amarulasolutions.com> References: <20200420215228.16175-1-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v3 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 MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 8819e9f60a..20a6ffb3af 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 "${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)