Bug 1036645 part 2 - Make using a separate config.cache the default for AC_OUTPUT_SUBDIRS. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 11 Jul 2014 19:06:07 +0900
changeset 193575 93f1af4bb4b205fd8cbbaf91fb0af8c70420283d
parent 193574 c4a56f872991965536a23d3a639441e415e6aab2
child 193576 a0ab7fa5dd58ee0a92aae12474c8b11b026e90f2
push id27123
push userryanvm@gmail.com
push dateFri, 11 Jul 2014 20:35:05 +0000
treeherdermozilla-central@84bd8d9f4256 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1036645
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1036645 part 2 - Make using a separate config.cache the default for AC_OUTPUT_SUBDIRS. r=gps All subconfigures are essentially doing it already, so just inverse the process. That would also limit problems with additional subconfigures (all the recent ones had to come with their own config.cache)
build/autoconf/ffi.m4
build/autoconf/hooks.m4
build/autoconf/icu.m4
configure.in
--- a/build/autoconf/ffi.m4
+++ b/build/autoconf/ffi.m4
@@ -83,22 +83,18 @@ if test -z "$BUILDING_JS" -o -n "$JS_STA
         ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix32"
       else
         ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix64"
       fi
     fi
 
     # Use a separate cache file for libffi, since it does things differently
     # from our configure.
-    mkdir -p $_objdir/js/src/ctypes/libffi
-    old_cache_file=$cache_file
-    cache_file=$_objdir/js/src/ctypes/libffi/config.cache
     old_config_files=$CONFIG_FILES
     unset CONFIG_FILES
     AC_OUTPUT_SUBDIRS(js/src/ctypes/libffi)
-    cache_file=$old_cache_file
     ac_configure_args="$_SUBDIR_CONFIG_ARGS"
     CONFIG_FILES=$old_config_files
   fi
 
 fi
 ])
 
--- a/build/autoconf/hooks.m4
+++ b/build/autoconf/hooks.m4
@@ -47,17 +47,20 @@ for moz_config_dir in $1; do
     ;;
   esac
 
   if test -d "$moz_config_dir"; then
     (cd "$moz_config_dir"; $PYTHON $_topsrcdir/build/subconfigure.py dump "$_CONFIG_SHELL")
   else
     mkdir -p "$moz_config_dir"
   fi
+  _save_cache_file="$cache_file"
+  ifelse($2,,cache_file="$moz_config_dir/config.cache",cache_file="$2")
   _MOZ_AC_OUTPUT_SUBDIRS($moz_config_dir)
+  cache_file="$_save_cache_file"
   (cd "$moz_config_dir"; $PYTHON $_topsrcdir/build/subconfigure.py adjust $ac_sub_configure)
 done
 
 MOZ_CONFIG_LOG_TRAP
 ])
 
 dnl Print error messages in config.log as well as stderr
 define([AC_MSG_ERROR],
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -184,17 +184,16 @@ if test -z "$BUILDING_JS" -o -n "$JS_STA
          export CPP="$HOST_CPP"
          export LD="$HOST_LD"
          export CFLAGS="$HOST_ICU_CFLAGS $HOST_OPTIMIZE_FLAGS"
          export CPPFLAGS="$ICU_CPPFLAGS"
          export CXXFLAGS="$HOST_ICU_CXXFLAGS $HOST_OPTIMIZE_FLAGS"
          export LDFLAGS="$HOST_LDFLAGS"
          ac_configure_args="$HOST_ICU_BUILD_OPTS"
          ac_configure_args="$ac_configure_args --enable-static --disable-shared --enable-extras=no --enable-icuio=no --enable-layout=no --enable-tests=no --enable-samples=no"
-         cache_file=$_objdir/intl/icu/host/config.cache
          AC_OUTPUT_SUBDIRS(intl/icu/source:intl/icu/host)
         ) || exit 1
     	# generate config/icucross.mk
     	$GMAKE -C $_objdir/intl/icu/host/ config/icucross.mk
 
     	# --with-cross-build requires absolute path
     	ICU_HOST_PATH=`cd $_objdir/intl/icu/host && pwd`
     	ICU_CROSS_BUILD_OPT="--with-cross-build=$ICU_HOST_PATH"
@@ -292,16 +291,15 @@ if test -z "$BUILDING_JS" -o -n "$JS_STA
          export LD="$LD"
          export ARFLAGS="$ARFLAGS"
          export CPPFLAGS="$ICU_CPPFLAGS $CPPFLAGS"
          export CFLAGS="$ICU_CFLAGS"
          export CXXFLAGS="$ICU_CXXFLAGS"
          export LDFLAGS="$ICU_LDFLAGS $LDFLAGS"
          ac_configure_args="$ICU_BUILD_OPTS $ICU_CROSS_BUILD_OPT $ICU_LINK_OPTS $ICU_TARGET_OPT"
          ac_configure_args="$ac_configure_args --disable-extras --disable-icuio --disable-layout --disable-tests --disable-samples"
-         cache_file=$_objdir/intl/icu/target/config.cache
          AC_OUTPUT_SUBDIRS(intl/icu/source:intl/icu/target)
         ) || exit 1
     fi
 
 fi
 
 ])
--- a/configure.in
+++ b/configure.in
@@ -9045,31 +9045,28 @@ if test -z "$MOZ_NATIVE_JEMALLOC" -a "$M
   fi
   EXTRA_CFLAGS="$CFLAGS"
   for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do
     ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'"
   done
   if test "$CROSS_COMPILE"; then
     ac_configure_args="$ac_configure_args je_cv_static_page_shift=12"
   fi
-  _save_cache_file="$cache_file"
-  cache_file=$_objdir/memory/jemalloc/src/config.cache
 
   if ! test -e memory/jemalloc; then
     mkdir -p memory/jemalloc
   fi
 
   dnl jemalloc's configure uses $srcdir in AC_CONFIG_HEADERS, which syntax uses
   dnl colons, conflicting with the windows-style path in $srcdir.
   dnl Turn it into a msys path just for jemalloc's configure
   _save_srcdir="$srcdir"
   srcdir=`cd $srcdir; pwd`
   AC_OUTPUT_SUBDIRS(memory/jemalloc/src)
   srcdir="$_save_srcdir"
-  cache_file="$_save_cache_file"
   ac_configure_args="$_SUBDIR_CONFIG_ARGS"
 fi
 
 # Run freetype configure script
 
 if test "$MOZ_TREE_FREETYPE"; then
    export CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS -std=c99"
    export CPPFLAGS="$CPPFLAGS $MOZ_DEBUG_FLAGS"
@@ -9083,17 +9080,17 @@ if test "$MOZ_TREE_FREETYPE"; then
    export ZLIB_LIBS="$MOZ_ZLIB_LIBS "
    export CONFIG_FILES="unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
    ac_configure_args="$ac_configure_args --host=$target --disable-shared --with-pic=yes --with-zlib=yes --without-bzip2 --with-png=yes --without-harfbuzz"
 
    if ! test -e modules; then
      mkdir modules
    fi
 
-   AC_OUTPUT_SUBDIRS(modules/freetype2)
+   AC_OUTPUT_SUBDIRS(modules/freetype2,$cache_file)
 fi
 
 if test -z "$direct_nspr_config"; then
     dnl ========================================================
     dnl = Setup a nice relatively clean build environment for
     dnl = sub-configures.
     dnl ========================================================
     CC="$_SUBDIR_CC"
@@ -9175,24 +9172,19 @@ if test -z "$MOZ_NATIVE_NSPR"; then
     if test -n "$MOZ_LINKER" -a "$ac_cv_func_dladdr" = no ; then
       # dladdr is supported by the new linker, even when the system linker doesn't
       # support it. Trick nspr into using dladdr when it's not supported.
       export CPPFLAGS="-include $_topsrcdir/mozglue/linker/dladdr.h $CPPFLAGS"
     fi
     export LDFLAGS="$LDFLAGS $NSPR_LDFLAGS"
     export CFLAGS="$CFLAGS $MOZ_FRAMEPTR_FLAGS"
 
-    # Use a separate cache file for NSPR since it uses autoconf 2.68.
-    _save_cache_file="$cache_file"
-    cache_file=$_objdir/nsprpub/config.cache
-
     AC_OUTPUT_SUBDIRS(nsprpub)
 
     # .. and restore them
-    cache_file="$_save_cache_file"
     CFLAGS="$_SAVE_CFLAGS"
     CPPFLAGS="$_SAVE_CPPFLAGS"
     LDFLAGS="$_SAVE_LDFLAGS"
 
     ac_configure_args="$_SUBDIR_CONFIG_ARGS"
 fi
 
 dnl ========================================================
@@ -9272,17 +9264,17 @@ export STLPORT_LIBS
 export JS_STANDALONE=no
 export MOZ_LINKER
 export ZLIB_IN_MOZGLUE
 
 if ! test -e js; then
     mkdir js
 fi
 
-AC_OUTPUT_SUBDIRS(js/src)
+AC_OUTPUT_SUBDIRS(js/src,$cache_file)
 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
 
 fi # COMPILE_ENVIRONMENT && !LIBXUL_SDK_DIR
 
 export WRITE_MOZINFO=1
 dnl we need to run config.status after js/src subconfigure because we're
 dnl traversing its moz.build and we need its config.status for that.
 dnl However, writing our own config.status needs to happen before