package/environment-setup: add configure alias
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>
Tue, 28 Apr 2020 14:45:59 +0000 (16:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 3 Nov 2020 21:40:53 +0000 (22:40 +0100)
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 <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
docs/manual/using-buildroot-toolchain.txt
package/environment-setup/environment-setup
package/environment-setup/environment-setup.mk

index 7a8b0c4c78051b747af75daa249c117ab9ef4dd2..110be5939fafbba7211c845a8098a80e837f1037 100644 (file)
@@ -42,6 +42,7 @@ variables that will help cross-compile your projects using the
 Buildroot SDK: the +PATH+ will contain the SDK binaries, standard
 _autotools_ variables will be defined with the appropriate values, and
 +CONFIGURE_FLAGS+ will contain basic +./configure+ options to
-cross-compile _autotools_ projects. Note however that once this script
-is sourced, the environment is setup only for cross-compilation, and
-no longer for native compilation.
+cross-compile _autotools_ projects. It also provides some useful
+commands. Note however that once this script is sourced, the
+environment is setup only for cross-compilation, and no longer for
+native compilation.
index 6846361433cbd361b21930fdff3f7cea72965d0f..58701e4c7165822e313ab4c788120578d80a95a1 100644 (file)
@@ -10,7 +10,8 @@ cat <<'EOF'
 Some tips:
 * PATH now contains the SDK utilities
 * Standard autotools variables (CC, LD, CFLAGS) are exported
-* To configure do "./configure $CONFIGURE_FLAGS"
+* To configure do "./configure $CONFIGURE_FLAGS" or use
+  the "configure" alias
 
 EOF
 SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}"))
index 98b976acf7d2b3a3aab5a9327fd35c3ba42aab97..be36cd452b97b361b3aa827ce68f4dc960a6f4eb 100644 (file)
@@ -20,6 +20,8 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_CMDS
                --sysconfdir=/etc \
                --localstatedir=/var \
                --program-prefix=\"\n" >> $(ENVIRONMENT_SETUP_FILE)
+       printf "alias configure=\"./configure \$${CONFIGURE_FLAGS}\"\n" \
+               >> $(ENVIRONMENT_SETUP_FILE)
        $(SED) 's%$(HOST_DIR)%\$$SDK_PATH%g' \
                -e 's%$(HOST_DIR)/bin/%%g' \
                -e '/^export "PATH=/c\' \