2004-12-14 Stepan Kasal * lib/autoconf/status.m4: Quote ``$tmp'' in many places. * lib/m4sugar/m4sh.m4: Quote the occurence of ``$tmp''. Index: lib/autoconf/status.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v retrieving revision 1.47 diff -u -r1.47 status.m4 --- lib/autoconf/status.m4 13 Dec 2004 17:58:03 -0000 1.47 +++ lib/autoconf/status.m4 14 Dec 2004 08:24:39 -0000 @@ -507,7 +507,7 @@ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin + cat >"$tmp/stdin" ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` @@ -522,7 +522,7 @@ ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp/stdin" ;; [[\\/$]]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || AC_MSG_ERROR([cannot find input file: $f]) @@ -542,7 +542,7 @@ esac done` || AS_EXIT([1]) # Remove the trailing spaces. - sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in + sed 's/[[ ]]*$//' $ac_file_inputs >"$tmp/in" _ACEOF @@ -588,14 +588,14 @@ # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep ["^[ ]*#[ ]*define"] $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep ["^[ ]*#[ ]*define"] "$tmp/in" >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + echo ' cat >"$tmp/defines.sed" <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo ['/^[ ]*#[ ]*define/!b'] >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. @@ -603,9 +603,9 @@ echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in + sed -f "$tmp/defines.sed" "$tmp/in" >"$tmp/out" + rm -f "$tmp/in" + mv "$tmp/out" "$tmp/in" ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines @@ -622,7 +622,7 @@ while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + echo ' cat >"$tmp/undefs.sed" <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo ['/^[ ]*#[ ]*undef/!b'] >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. @@ -630,9 +630,9 @@ echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in + sed -f "$tmp/undefs.sed" "$tmp/in" >"$tmp/out" + rm -f "$tmp/in" + mv "$tmp/out" "$tmp/in" ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs @@ -646,24 +646,24 @@ # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h + echo "/* Generated by configure. */" >"$tmp/config.h" else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated by configure. */" >"$tmp/config.h" fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + cat "$tmp/in" >>"$tmp/config.h" + rm -f "$tmp/in" if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then AC_MSG_NOTICE([$ac_file is unchanged]) else ac_dir=`AS_DIRNAME(["$ac_file"])` AS_MKDIR_P(["$ac_dir"]) rm -f $ac_file - mv $tmp/config.h $ac_file + mv "$tmp/config.h" $ac_file fi else - cat $tmp/config.h - rm -f $tmp/config.h + cat "$tmp/config.h" + rm -f "$tmp/config.h" fi dnl If running for Automake, be ready to perform additional dnl commands to set up the timestamp files. @@ -874,7 +874,7 @@ dnl of the sed commands issued by AC_SUBST. So if you change one, change dnl the other too. [ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF] + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp/subs.sed" <<\\CEOF] dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once. dnl Insert the sed substitutions of variables. @@ -904,11 +904,11 @@ ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + sed "1,${ac_beg}d; ${ac_end}q" "$tmp/subs.sed" >"$tmp/subs.frag" else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + sed "${ac_end}q" "$tmp/subs.sed" >"$tmp/subs.frag" fi - if test ! -s $tmp/subs.frag; then + if test ! -s "$tmp/subs.frag"; then ac_more_lines=false else # The purpose of the label and of the branching condition is to @@ -916,11 +916,11 @@ # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo [':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b'] && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b'] && cat "$tmp/subs.frag") >"$tmp/subs-$ac_sed_frag.sed" if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f '$tmp/subs-$ac_sed_frag.sed'" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f '$tmp/subs-$ac_sed_frag.sed'" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end @@ -938,7 +938,7 @@ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin + cat >"$tmp/stdin" ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` @@ -978,7 +978,7 @@ ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp/stdin" ;; [[\\/$]]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || AC_MSG_ERROR([cannot find input file: $f]) @@ -1019,20 +1019,20 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t ])dnl dnl The parens around the eval prevent an "illegal io" in Ultrix sh. -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin +" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp/out" + rm -f "$tmp/stdin" dnl This would break Makefile dependencies. -dnl if diff $ac_file $tmp/out >/dev/null 2>&1; then +dnl if diff $ac_file "$tmp/out" >/dev/null 2>&1; then dnl echo "$ac_file is unchanged" dnl else dnl rm -f $ac_file -dnl mv $tmp/out $ac_file +dnl mv "$tmp/out" $ac_file dnl fi if test x"$ac_file" != x-; then - mv $tmp/out $ac_file + mv "$tmp/out" $ac_file else - cat $tmp/out - rm -f $tmp/out + cat "$tmp/out" + rm -f "$tmp/out" fi m4_ifset([AC_LIST_FILES_COMMANDS], Index: lib/m4sugar/m4sh.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v retrieving revision 1.125 diff -u -r1.125 m4sh.m4 --- lib/m4sugar/m4sh.m4 13 Dec 2004 18:22:55 -0000 1.125 +++ lib/m4sugar/m4sh.m4 14 Dec 2004 08:24:39 -0000 @@ -960,7 +960,7 @@ } || { tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM - (umask 077 && mkdir $tmp) + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in m4_default([$2], [$TMPDIR])" >&2