python/mozbuild/mozbuild/mozconfig_loader
author Gregory Szorc <gps@mozilla.com>
Fri, 27 Oct 2017 15:20:34 -0700
changeset 439809 5fb427c50ca3e2adb541581c68721c845d1130ac
parent 419652 692beddc13e32b15237075354d1d575aa3946a29
child 513607 054704143909685200ad13e8c067d41b744ed754
permissions -rwxr-xr-x
Bug 1412431 - Remove support for MOZ_BUILD_PROJECTS; r=nalexander This was mainly used to support Universal MacOS builds, which were removed several months ago. In theory, someone could be using this feature to build multiple applications with one build system invocation. But given that client.mk is no longer the preferred interface to the build system and multiple applications can be built by running `mach build` with different mozconfigs, I don't think support for this feature is worth keeping. This commit removes support for MOZ_BUILD_PROJECTS and related functionality from client.mk. Support for recognizing MOZ_CURRENT_PROJECT in configure and mozconfig evaluation has also been removed. This includes support for the ac_add_app_options mozconfig function. Good riddance. MozReview-Commit-ID: 7xI2jYxDFFr

#!/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
    case "$_mozconfig_opt" in
    --target=*)
      echo "------BEGIN_MK_OPTION"
      echo $_mozconfig_opt | sed s/--target/CONFIG_GUESS/
      echo "------END_MK_OPTION"
      ;;
    esac
    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"