better config.reconfig script auto-generated
authorMorgan Deters <mdeters@gmail.com>
Sat, 3 Jul 2010 18:18:55 +0000 (18:18 +0000)
committerMorgan Deters <mdeters@gmail.com>
Sat, 3 Jul 2010 18:18:55 +0000 (18:18 +0000)
configure.ac

index 0bced368012947d48e0dd6d2e28488a4e47d787a..49e35f71e53d3527b872b7b765e9b7bf4d63e4fa 100644 (file)
@@ -281,15 +281,20 @@ elif test "$CVC4_CONFIGURE_AT_TOP_LEVEL" = yes; then
   cd ../../..
   if test $exitval -eq 0; then
     cat >config.reconfig <<EOF
-#!/bin/sh -ex
+[#!/bin/bash
 # Generated by configure, `date`
 # This script part of CVC4.
 
-target='$target'
-build_type='$build_type'
+cd "\`dirname \\"\$0\\"\`"
 
-cd "builds/$target/$build_type"
-./config.status "\$@"
+current=(\`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]\\+\\)/\\(.*\\),\\1 \\2,'\`)
+arch=\${current[0]}
+build=\${current[1]}
+
+echo "reconfiguring in builds/\$arch/\$build..."
+cd "builds/\$arch/\$build"
+echo ./config.status "\$@"
+./config.status "\$@"]
 EOF
     chmod +x config.reconfig
   fi