python/mozbuild/mozbuild/mozconfig_loader
author Andrew McCreight <continuation@gmail.com>
Fri, 27 May 2022 13:15:11 +0000
changeset 619075 cf40e7b79bb18c1e4c18726eb603702304cc531e
parent 545084 12dc30518f32450f3651fce0689cc2c2cfe2ef87
permissions -rwxr-xr-x
Bug 1771381 - Use entries in TabAttributesInternal.set(). r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D147457

#!/bin/sh
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# This script provides an execution environment for mozconfig scripts.
# This script is not meant to be called by users. Instead, some
# higher-level driver invokes it and parses the machine-tailored output.

set -e

ac_add_options() {
  for _mozconfig_opt; do
    echo "------BEGIN_AC_OPTION"
    echo $_mozconfig_opt
    echo "------END_AC_OPTION"
  done
}

mk_add_options() {
  for _mozconfig_opt; do
    echo "------BEGIN_MK_OPTION"
    echo $_mozconfig_opt
    echo "------END_MK_OPTION"
  done
}

echo "------BEGIN_ENV_BEFORE_SOURCE"
"$3" "$4"
echo "------END_ENV_BEFORE_SOURCE"

echo "------BEGIN_BEFORE_SOURCE"
set
echo "------END_BEFORE_SOURCE"

topsrcdir="$1"

. "$2"

unset topsrcdir

echo "------BEGIN_AFTER_SOURCE"
set
echo "------END_AFTER_SOURCE"

echo "------BEGIN_ENV_AFTER_SOURCE"
"$3" "$4"
echo "------END_ENV_AFTER_SOURCE"