From 9d3982dc57d6e823a1e42cadbc196b596538d31c Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 14 Aug 2007 21:45:08 -0400 Subject: [PATCH] Improved framework to support $configcache list on every stage, and changed to keep config.cache in $builddir --- lib/functions.in | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lib/functions.in b/lib/functions.in index 48930c9..5baea09 100644 --- a/lib/functions.in +++ b/lib/functions.in @@ -248,11 +248,24 @@ function eval_config_command() { fi done - if atstage cross; then - create_config_cache >> config.cache + if [ -n "$configcache" ] || atstage cross; then + if atstage cross; then + create_config_cache >> $builddir/config.cache + fi + + if [ -n "$configcache" ]; then + cat <<-EOT + + # Some custom values + EOT + for x in $configcache; do + echo "$x" + done + fi >> $builddir/config.cache + grep -q '.--cache-file=' $configscript && - set -- "$@" "--cache-file=./config.cache" - export cache_file=./config.cache + set -- "$@" "--cache-file=$builddir/config.cache" + export cache_file=$builddir/config.cache fi config_command="$configprefix $configscript" @@ -426,7 +439,6 @@ rock_substitute() { # packages to cross-build correctly in stages 0 and 1. # create_config_cache() { - local x= cat $base/scripts/config.cache if [ $createarchcache -eq 1 ]; then @@ -442,16 +454,6 @@ create_config_cache() { ac_cv_c_bigendian=$arch_bigendian EOT fi - - if [ "$configcache" ]; then - cat <<-EOT - - # And some custom values - EOT - for x in $configcache; do - echo "$x" - done - fi } # Abort build before actual build starts