]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi: "filesystem" -> "file system".
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Jun 2005 06:05:11 +0000 (06:05 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Jun 2005 06:05:11 +0000 (06:05 +0000)
"behavior" -> "behavior".
Warn about \(...\)* in Solaris sed (written by Ralf Menzel).
* lib/autoconf/general.m4: Omit blank after ":" sed command,
as per POSIX.
* lib/m4sugar/m4sh.m4: Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Work around problem
with Solaris sed.  Fix by Stepan Kasal.

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

index 78e181947f4f637f25c49bf741e3df8d3d7668c2..0395dab3d36bddd16edd917681a503d2a856c5a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * doc/autoconf.texi: "filesystem" -> "file system".
+       "behavior" -> "behavior".
+       Warn about \(...\)* in Solaris sed (written by Ralf Menzel).
+       * lib/autoconf/general.m4: Omit blank after ":" sed command,
+       as per POSIX.
+       * lib/m4sugar/m4sh.m4: Likewise.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Work around problem
+       with Solaris sed.  Fix by Stepan Kasal.
+
        * man/Makefile.am (MOSTLYCLEANFILES): Add $(srcdir)/*.t.
        (.x.1): Ignore the time stamp in the .TH line when deciding whether
        to update the man page.  That way, we don't have to check in new
index c700383e7c10f25a282202b800d110a5d97e20ef..9c3f96a9939b740acfae5a83b9f9319e164f8da4 100644 (file)
@@ -712,7 +712,7 @@ The ubiquity of @command{make} means that a @file{Makefile} is almost the
 only viable way to distribute automatic build rules for software, but
 one quickly runs into @command{make}'s numerous limitations.  Its lack of
 support for automatic dependency tracking, recursive builds in
-subdirectories, reliable timestamps (e.g., for network filesystems), and
+subdirectories, reliable timestamps (e.g., for network file systems), and
 so on, mean that developers must painfully (and often incorrectly)
 reinvent the wheel for each project.  Portability is non-trivial, thanks
 to the quirks of @command{make} on many systems.  On top of all this is the
@@ -3072,7 +3072,7 @@ If a given @var{dir} contains @command{configure.gnu}, it is run instead
 of @command{configure}.  This is for packages that might use a
 non-Autoconf script @command{Configure}, which can't be called through a
 wrapper @command{configure} since it would be the same file on
-case-insensitive filesystems.  Likewise, if a @var{dir} contains
+case-insensitive file systems.  Likewise, if a @var{dir} contains
 @file{configure.in} but no @command{configure}, the Cygnus
 @command{configure} script found by @code{AC_CONFIG_AUX_DIR} is used.
 
@@ -11230,7 +11230,7 @@ outputs logical directory names, which have the following advantages:
 Logical names are what the user specified.
 @item
 Physical names may not be portable from one installation
-host to another due to network filesystem gymnastics.
+host to another due to network file system gymnastics.
 @item
 On modern hosts @samp{pwd -P} may fail due to lack of permissions to
 some parent directory, but plain @command{pwd} cannot fail for this
@@ -11647,7 +11647,7 @@ newer systems, @code{rename}).
 
 @cindex timestamp resolution
 Traditionally, file timestamps had 1-second resolution, and @samp{cp
--p} copied the timestamps exactly.  However, many modern filesystems
+-p} copied the timestamps exactly.  However, many modern file systems
 have timestamps with 1-nanosecond resolution.  Unfortunately, @samp{cp
 -p} implementations truncate timestamps when copying files, so this
 can result in the destination file appearing to be older than the
@@ -12135,6 +12135,17 @@ Nested parenthesization in patterns (e.g., @samp{\(\(a*\)b*)\)}) is
 quite portable to modern hosts, but is not supported by some older
 @command{sed} implementations like SVR3.
 
+Some @command{sed} implementations, e.g., Solaris 10,
+restrict the special role of the asterisk to one-character regular expressions.
+This may lead to unexpected behavior:
+
+@example
+$ @kbd{echo '1*23*4' | /usr/bin/sed 's/\(.\)*/x/g'}
+x2x4
+$ @kbd{echo '1*23*4' | /usr/xpg4/bin/sed 's/\(.\)*/x/g'}
+x
+@end example
+
 The @option{-e} option is portable.
 Some people prefer to use it:
 
@@ -12243,7 +12254,7 @@ jumps.  Finally, since the flag is clear, 4 is processed properly.
 There are two things one should remember about @samp{t} in @command{sed}.
 Firstly, always remember that @samp{t} jumps if @emph{some} substitution
 succeeded, not only the immediately preceding substitution.  Therefore,
-always use a fake @samp{t clear; : clear} to reset the t flag where
+always use a fake @samp{t clear; :clear} to reset the t flag where
 needed.
 
 Secondly, you cannot rely on @command{sed} to clear the flag at each new
@@ -13057,7 +13068,7 @@ As a result, in such a case, you have to write target rules.
 @cindex timestamp resolution
 Traditionally, file timestamps had 1-second resolution, and
 @command{make} used those timestamps to determine whether one file was
-newer than the other.  However, many modern filesystems have
+newer than the other.  However, many modern file systems have
 timestamps with 1-nanosecond resolution.  Some @command{make}
 implementations look at the entire timestamp; others ignore the
 fractional part, which can lead to incorrect results.  Normally this
@@ -13315,7 +13326,7 @@ names won't.  Here are some guidelines,
 Availability of libraries and library functions should always be checked
 by probing.
 @item
-Variant behaviour of system calls is best identified with runtime tests
+Variant behavior of system calls is best identified with runtime tests
 if possible, but bug workarounds or obscure difficulties might have to
 be driven from @samp{$host}.
 @item
index 429bc201169ffe390d2b2212ed32ded474ccfd61..5c23b3d2e4a2d0f57fe50e12a996cde8b357871f 100644 (file)
@@ -1858,11 +1858,11 @@ _ACEOF
 _AC_CACHE_DUMP() |
   sed ['
      t clear
-     : clear
+     :clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
      t end
      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end'] >>confcache
+     :end'] >>confcache
 if diff $cache_file confcache >/dev/null 2>&1; then :; else
   if test -w $cache_file; then
     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
index 1f1ec5f90c43c2649ad9ddc718367cf0195ae8b7..951fa895b74bd2eb3612d41895d8fd28419903be 100644 (file)
@@ -499,15 +499,17 @@ m4_define([_AC_OUTPUT_HEADERS],
 #
 dnl Quote, for the `[ ]' and `define'.
 [ac_dA='s,^\([  ]*#[    ]*\)[^  ]*\([   ][      ]*'
-ac_dB='\)\([   (].*\)*$,\1define\2'
+ac_dB='\)[     (].*$,\1define\2'
 ac_dC=' '
-ac_dD=',']
-dnl ac_dD used to contain `;t' at the end.
-dnl This was an optimization which was making the code both slow and incorrect.
-dnl 1) Since the script has to be broken to chunks containing 100 commands,
-dnl this extra command means we have to call sed more times.
-dnl 2) The code was incorrect: in the strange case that a sumbol has multiple
-dnl different AC_DEFINEs, we want to honour the *last* one.
+ac_dD=' ,']
+dnl ac_dD used to contain `;t' at the end, but that was both slow and incorrect.
+dnl 1) Since the script must be broken into chunks containing 100 commands,
+dnl the extra command meant extra calls to sed.
+dnl 2) The code was incorrect: in the unusual case where a symbol has multiple
+dnl different AC_DEFINEs, the last one should be honored.
+dnl
+dnl ac_dB works because every line has a space appended.  ac_dB reinserts
+dnl the space, because some symbol may have been AC_DEFINEd several times.
 
 [ac_word_regexp=[_$as_cr_Letters][_$as_cr_alnum]*]
 
@@ -550,16 +552,17 @@ _ACEOF
 
 # Transform confdefs.h into a sed script `conftest.defines', that
 # substitutes the proper values into config.h.in to produce config.h.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC_DEFINE to be honored.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
 dnl
 dnl Quote, for `[ ]' and `define'.
-[rm -f conftest.defines conftest.tail
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+[ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
 uniq confdefs.h |
   sed -n '
        t rset
@@ -572,14 +575,15 @@ uniq confdefs.h |
        s/[\\$`]/\\&/g
        s/^\('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/${ac_dA}\1$ac_dB\2${ac_dC}\3$ac_dD/p
        s/^\('"$ac_word_re"'\)[         ]*\(.*\)/${ac_dA}\1$ac_dB${ac_dC}\2$ac_dD/p
-  ' >conftest.defines
+  ' >>conftest.defines
 ]
-# This sed command replaces #undef with comments.  This is necessary, for
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-# (The regexp can be very short, we know the line contains either #define
-# or #undef.)
-echo '[s,^[     #]*u.*,/* & */,]' >>conftest.defines
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+[s,^[   #]*u.*,/* & */,]' >>conftest.defines
 
 # Break up conftest.defines:
 ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3)
index f8bf440fededf035515161991197d2c34f7df0d4..a73636b38171e4000bf91b98e637858eda4b2c1e 100644 (file)
@@ -755,9 +755,9 @@ _AS_LINENO_WORKS || {
       s,[[$]]LINENO.*,&-,
       t lineno
       b
-      : lineno
+      :lineno
       N
-      : loop
+      :loop
       s,[[$]]LINENO\([[^'$as_cr_alnum'_]].*\n\)\(.*\),\2\1\2,
       t loop
       s,-\n.*,,