]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/status.m4: Quote ``$tmp'' in many places.
authorStepan Kasal <kasal@ucw.cz>
Tue, 21 Dec 2004 14:24:01 +0000 (14:24 +0000)
committerStepan Kasal <kasal@ucw.cz>
Tue, 21 Dec 2004 14:24:01 +0000 (14:24 +0000)
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): Fix the comment, as traps are
  no longer part of the macro, quote the occurrence of ``$tmp''.
* doc/autoconf.texi (Forbidden Patterns): Typo.

ChangeLog
doc/autoconf.texi
lib/autoconf/status.m4
lib/m4sugar/m4sh.m4

index 0a20a2b130848b172649b050b598b10e94bf7754..2436685c5070bc3d55182f468eeae53e35473135 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-21  Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/autoconf/status.m4: Quote ``$tmp'' in many places.
+       * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Fix the comment, as traps are
+         no longer part of the macro, quote the occurrence of ``$tmp''.
+       * doc/autoconf.texi (Forbidden Patterns): Typo.
+
 2004-12-21  Akim Demaille  <akim@epita.fr>
 
        * lib/autotest/general.m4 (AT_INIT): Make sure the "ok" etc. are
index 63fad57c38fe2d3d9ea0c7557388e963602ef22d..1f09d4a13887086c9a6b0006dac4029071c9ef0a 100644 (file)
@@ -8727,7 +8727,7 @@ Declare that no token matching @var{pattern} must be found in the output.
 Comments are not checked; this can be a problem if, for instance, you
 have some macro left unexpanded after an @samp{#include}.  No consensus
 is currently found in the Autoconf community, as some people consider it
-should be valid to name macros in comments (which doesn't makes sense to
+should be valid to name macros in comments (which doesn't make sense to
 the author of this documentation, as @samp{#}-comments should document
 the output, not the input, documented by @samp{dnl} comments).
 @end defmac
index 3ab9ebb66f7b7a9fdbb5ecdcde8817da449edea6..ca54ab6dd43adb2e00ba7380d29b79155a5fa04a 100644 (file)
@@ -507,7 +507,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   # 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 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   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 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
       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 @@ _ACEOF
 # 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 <<CEOF' >>$CONFIG_STATUS
+  echo '  cat >"$tmp/defines.sed" <<CEOF' >>$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 @@ do
   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 @@ rm -f conftest.tail
 while grep . conftest.undefs >/dev/null
 do
   # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  echo '  cat >"$tmp/undefs.sed" <<CEOF' >>$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 @@ do
   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 @@ cat >>$CONFIG_STATUS <<\_ACEOF
   # 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 Please, pay attention that this sed code depends a lot on the shape
 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 @@ dnl Here, there are 2 cmd per line, and two cmd are added later.
   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 @@ dnl Here, there are 2 cmd per line, and two cmd are added later.
       # 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 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # 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_PROVIDE_IFELSE([AC_PROG_INSTALL],
   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 @@ s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
 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 2016b34e381ef881d62096bbb9bee0602d6049cf..3036cab6f80257cdde88b65c8305b17899a30ba5 100644 (file)
@@ -940,8 +940,7 @@ m4_define([AS_LITERAL_IF],
 # AS_TMPDIR(PREFIX, [DIRECTORY = $TMPDIR [= /tmp]])
 # -------------------------------------------------
 # Create as safely as possible a temporary directory in DIRECTORY
-# which name is inspired by PREFIX (should be 2-4 chars max), and set
-# trap mechanisms to remove it.
+# which name is inspired by PREFIX (should be 2-4 chars max).
 m4_define([AS_TMPDIR],
 [# Create a (secure) tmp directory for tmp files.
 m4_if([$2], [], [: ${TMPDIR=/tmp}])
@@ -951,7 +950,7 @@ m4_if([$2], [], [: ${TMPDIR=/tmp}])
 }  ||
 {
   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