#!/bin/sh

# In an ideal world the top level makefile would be completely independent of
# the config, it should only contain global settings that apply to all builds.
# However at least one architecture (ppc) is breaking the rules, its include
# path depends on the config settings instead of using the same include paths as
# everyone else.
#
# I do _not_ want to include .config in the top level makefile, it leads to make
# recursion hell, see the barf bag code in scripts/Makefile-2.5.  The script
# below extracts and prints one option from .config, without tripping the
# recursion problem.  If .config does not exist or the option is not set then it
# prints nothing.  KAO

[ -r $KBUILD_OBJTREE/.config ] && sed -ne "/^$1=/s/^$1=//p" $KBUILD_OBJTREE/.config
