From fe76207882ac015080751eeb258f24d857f3e2b5 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 11 Jul 2014 19:06:07 +0900 Subject: [PATCH] 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 | 4 ---- build/autoconf/hooks.m4 | 3 +++ build/autoconf/icu.m4 | 2 -- configure.in | 12 ++---------- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/build/autoconf/ffi.m4 b/build/autoconf/ffi.m4 index 6bca716c8fe..e775c615d44 100644 --- a/build/autoconf/ffi.m4 +++ b/build/autoconf/ffi.m4 @@ -88,13 +88,9 @@ if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then # 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 diff --git a/build/autoconf/hooks.m4 b/build/autoconf/hooks.m4 index cc0d103fe22..a031c7bd569 100644 --- a/build/autoconf/hooks.m4 +++ b/build/autoconf/hooks.m4 @@ -52,7 +52,10 @@ for moz_config_dir in $1; do 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 diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 index d1b3a408ddf..c173179c9d6 100644 --- a/build/autoconf/icu.m4 +++ b/build/autoconf/icu.m4 @@ -189,7 +189,6 @@ if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then 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 @@ -297,7 +296,6 @@ if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then 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 diff --git a/configure.in b/configure.in index 6640aa13753..72aee612698 100644 --- a/configure.in +++ b/configure.in @@ -9050,8 +9050,6 @@ if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC3" - 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 @@ -9064,7 +9062,6 @@ if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC3" - 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 @@ -9088,7 +9085,7 @@ if test "$MOZ_TREE_FREETYPE"; then mkdir modules fi - AC_OUTPUT_SUBDIRS(modules/freetype2) + AC_OUTPUT_SUBDIRS(modules/freetype2,$cache_file) fi if test -z "$direct_nspr_config"; then @@ -9180,14 +9177,9 @@ if test -z "$MOZ_NATIVE_NSPR"; then 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" @@ -9277,7 +9269,7 @@ 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