changeset 48846:fe434d568439

8197571: Change storage location for generated-configure.sh Reviewed-by: tbell, simonis, stuefe
author ihse
date Mon, 12 Feb 2018 16:36:15 +0100
parents b3a833c9c6e9
children da4b1106787e
files .hgignore make/autoconf/basics.m4 make/autoconf/configure
diffstat 3 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Mon Feb 12 09:12:41 2018 +0100
+++ b/.hgignore	Mon Feb 12 16:36:15 2018 +0100
@@ -1,5 +1,4 @@
 ^build/
-^.build/
 ^dist/
 ^.idea/
 nbproject/private/
--- a/make/autoconf/basics.m4	Mon Feb 12 09:12:41 2018 +0100
+++ b/make/autoconf/basics.m4	Mon Feb 12 16:36:15 2018 +0100
@@ -814,6 +814,7 @@
           | $SED -e 's/config.log//g' \
               -e 's/configure.log//g' \
               -e 's/confdefs.h//g' \
+              -e 's/configure-support//g' \
               -e 's/ //g' \
           | $TR -d '\n'`
       if test "x$filtered_files" != x; then
--- a/make/autoconf/configure	Mon Feb 12 09:12:41 2018 +0100
+++ b/make/autoconf/configure	Mon Feb 12 16:36:15 2018 +0100
@@ -50,9 +50,21 @@
     echo "Error: Cannot continue" 1>&2
     exit 1
   fi
-  build_support_dir="$CUSTOM_ROOT/.build"
+fi
+
+CURRENT_DIR=`pwd`
+if test "x$CURRENT_DIR" = "x$TOPDIR"; then
+  # We are running configure from the src root.
+  # Create '.configure-support' under $TOPDIR/build
+  build_support_dir="$TOPDIR/build/.configure-support"
+elif test "x$CURRENT_DIR" = "x$CUSTOM_ROOT"; then
+  # We are running configure from the custom root.
+  # Create '.configure-support' under $CUSTOM_ROOT/build
+  build_support_dir="$CUSTOM_ROOT/build/.configure-support"
 else
-  build_support_dir="$TOPDIR/.build"
+  # We are running configure from outside of the src dir.
+  # Create 'build_support_dir' in the current directory.
+  build_support_dir="$CURRENT_DIR/configure-support"
 fi
 
 conf_script_dir="$TOPDIR/make/autoconf"
@@ -114,7 +126,7 @@
     custom_patcher='cat'
   fi
 
-  mkdir -p `dirname $generated_script`
+  mkdir -p $build_support_dir
   # Call autoconf but replace the "magic" variable in configure.ac if requested.
   cat $conf_script_dir/configure.ac | eval $custom_patcher | \
       ${AUTOCONF} -W all -I$conf_script_dir - > $generated_script
@@ -164,7 +176,7 @@
 fi
 
 if test "x$run_autoconf" = xtrue; then
-  echo "Generating runnable configure script"
+  echo "Generating runnable configure script at $generated_script"
   generate_configure_script
 fi