autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

empty command redirection


From: Ralf Wildenhues
Subject: empty command redirection
Date: Fri, 8 Oct 2004 08:51:32 +0200
User-agent: Mutt/1.4.1i

So far I've thought that 
  > file
was a less portable way as
  : > file
to create an empty file.  If that is correct, please consider applying
the following patch.

Regards,
Ralf


2004-10-08  Ralf Wildenhues <address@hidden>

        * lib/autoconf/general.m4 (AC_CACHE_LOAD), 
        lib/autotest/general.m4 (AT_INIT): Create empty file with
        `: >' instead of '>'.


Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.834
diff -u -r1.834 general.m4
--- lib/autoconf/general.m4     20 Aug 2004 22:54:51 -0000      1.834
+++ lib/autoconf/general.m4     6 Sep 2004 11:30:53 -0000
@@ -1725,13 +1725,13 @@
   if test -f "$cache_file"; then
     AC_MSG_NOTICE([loading cache $cache_file])
     case $cache_file in
      [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
      *)                      . ./$cache_file;;
     esac
   fi
 else
   AC_MSG_NOTICE([creating cache $cache_file])
-  >$cache_file
+  : >$cache_file
 fi
 ])# AC_CACHE_LOAD
 
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.159
diff -u -r1.159 general.m4
--- lib/autotest/general.m4     5 Sep 2004 22:26:41 -0000       1.159
+++ lib/autotest/general.m4     6 Sep 2004 11:30:54 -0000
@@ -567,7 +567,7 @@
   at_devnull=/dev/null
 else
   at_devnull=$at_suite_dir/devnull
-  >"$at_devnull"
+  : >"$at_devnull"
 fi
 
 # Use `diff -u' when possible.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]