From e71f08e5bacc09e8704e1da3be18567380def577 Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Tue, 7 Mar 1995 00:38:46 +0000 Subject: [PATCH] fix bug in John's code with cache file /dev/null --- acgeneral.m4 | 10 +++++----- lib/autoconf/general.m4 | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/acgeneral.m4 b/acgeneral.m4 index 925481178..eade923c1 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -889,7 +889,7 @@ fi dnl AC_CACHE_SAVE() define(AC_CACHE_SAVE, -[cat > $cache_file.$$ <<\EOF +[cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. @@ -911,19 +911,19 @@ dnl Allow a site initialization script to override cache values. # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> $cache_file.$$ + >> confcache changequote([, ])dnl -if cmp -s $cache_file $cache_file.$$; then +if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" - cat $cache_file.$$ > $cache_file + cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi -rm -f $cache_file.$$ +rm -f confcache ]) dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 925481178..eade923c1 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -889,7 +889,7 @@ fi dnl AC_CACHE_SAVE() define(AC_CACHE_SAVE, -[cat > $cache_file.$$ <<\EOF +[cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. @@ -911,19 +911,19 @@ dnl Allow a site initialization script to override cache values. # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> $cache_file.$$ + >> confcache changequote([, ])dnl -if cmp -s $cache_file $cache_file.$$; then +if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" - cat $cache_file.$$ > $cache_file + cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi -rm -f $cache_file.$$ +rm -f confcache ]) dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. -- 2.47.3