]>
git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/blob - oe-init-build-env
3 # OE Build Environment Setup Script
5 # Copyright (C) 2006-2011 Linux Foundation
7 # SPDX-License-Identifier: GPL-2.0-or-later
11 # Normally this is called as '. ./oe-init-build-env <builddir>'
13 # This works in most shells (not dash), but not all of them pass the arguments
14 # when being sourced. To workaround the shell limitation use "set <builddir>"
15 # prior to sourcing this script.
17 if [ -n "$BASH_SOURCE" ]; then
18 THIS_SCRIPT
=$BASH_SOURCE
19 elif [ -n "$ZSH_NAME" ]; then
22 THIS_SCRIPT
="$(pwd)/oe-init-build-env"
23 if [ ! -e "$THIS_SCRIPT" ]; then
24 echo "Error: $THIS_SCRIPT doesn't exist!" >&2
25 echo "Please run this script in oe-init-build-env's directory." >&2
29 if [ -n "$BBSERVER" ]; then
33 if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
34 echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" >&2
38 if [ -z "$OEROOT" ]; then
39 OEROOT
=$
(dirname "$THIS_SCRIPT")
40 OEROOT
=$
(readlink
-f "$OEROOT")
45 .
"$OEROOT"/scripts
/oe-buildenv-internal
&&
46 TEMPLATECONF
="$TEMPLATECONF" "$OEROOT"/scripts
/oe-setup-builddir ||
{
52 [ -z "$BUILDDIR" ] ||
cd "$BUILDDIR"