python/mozbuild/mozbuild/mozconfig_loader
author Boris Zbarsky <bzbarsky@mit.edu>
Tue, 07 May 2013 22:34:56 -0400
changeset 142158 6e00018528cd8dca0386f0405bedb019cd9d516c
parent 138509 445d8eecdd80acdb2a4e2e59d4bf33fd74ac220e
child 151292 666b931894d92eedc22981a983506d2e2f51f3bd
permissions -rwxr-xr-x
Bug 869311. More rooting in dom/bindings and content/base. r=smaug

#!/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() {
  local opt
  for opt in $*; do
    echo "------BEGIN_AC_OPTION"
    echo $opt
    echo "------END_AC_OPTION"
  done
}

ac_add_app_options() {
  local app opt
  app=$1
  shift
  echo "------BEGIN_AC_APP_OPTION"
  echo $app
  echo "$*"
  echo "------END_AC_APP_OPTION"
}

mk_add_options() {
  local opt
  for opt in $*; do
    echo "------BEGIN_MK_OPTION"
    echo $opt
    echo "------END_MK_OPTION"
  done
}

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

topsrcdir=$1

. $2

unset topsrcdir

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