[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: config.status gets too many copies of precious variables [2.52, patc
From: |
Aaron Ucko |
Subject: |
Re: config.status gets too many copies of precious variables [2.52, patch] |
Date: |
27 Nov 2001 10:41:16 -0500 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 |
Paul Eggert <address@hidden> writes:
> shells. Also, it seems to me that the above loop isn't always correct
> with args that need escaping.
Never mind, whitespace was a problem after all. Oops.
> Perhaps you can propose a revised patch with these suggestions in mind.
How's this, then?
2001-11-27 Aaron M. Ucko <address@hidden>
* lib/autoconf/general.m4: Avoid duplicates in `$ac_configure_args'.
*** lib/autoconf/general.m4.dist Fri Oct 19 06:40:42 2001
--- lib/autoconf/general.m4 Tue Nov 27 10:21:26 2001
***************
*** 1130,1147 ****
do
case $ac_arg in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
! | --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
dnl If you change this globbing pattern, test it on an old shell --
dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
! ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
! ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
! ac_sep=" " ;;
! *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
! ac_sep=" " ;;
esac
# Get rid of the leading space.
done
--- 1130,1149 ----
do
case $ac_arg in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
! | --no-cr | --no-c) continue ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
! continue ;;
dnl If you change this globbing pattern, test it on an old shell --
dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
! ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ esac
# Get rid of the leading space.
done
***************
*** 1366,1384 ****
ac_cache_corrupted=:
fi;;
esac
! # Pass precious variables to config.status. It doesn't matter if
! # we pass some twice (in addition to the command line arguments).
if test "$ac_new_set" = set; then
case $ac_new_val in
dnl If you change this globbing pattern, test it on an old shell --
dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
! ac_configure_args="$ac_configure_args '$ac_arg'"
! ;;
! *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
! ;;
esac
fi
done
if $ac_cache_corrupted; then
--- 1368,1386 ----
ac_cache_corrupted=:
fi;;
esac
! # Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
dnl If you change this globbing pattern, test it on an old shell --
dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
! *) ac_arg=$ac_var=$ac_new_val ;;
esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
fi
done
if $ac_cache_corrupted; then