autoconf-patches
[Top][All Lists]
Advanced

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

Re: some modernizations to the documentation (esp. VPATH builds)


From: Paul Eggert
Subject: Re: some modernizations to the documentation (esp. VPATH builds)
Date: Mon, 05 Jun 2006 01:48:31 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

>> I recently discovered that VPATH builds don't work for Solaris make.
>
> Well, they do work.

I suppose it depends on the definition of "work".  It doesn't work for
coreutils CVS "make check".  This is because the Coreutils + Automake
trick of doing something like this:

        TESTS = foo bar baz

        TESTS_ENVIRONMENT = \
          PROG=$$tst

        check-TESTS: $(TESTS)
                @failed=0; all=0; xfail=0; xpass=0; skip=0; \
                srcdir=$(srcdir); export srcdir; \
                list='$(TESTS)'; \
                if test -n "$$list"; then \
                  for tst in $$list; do \
                    if test -f ./$$tst; then dir=./; \
                    elif test -f $$tst; then dir=; \
                    else dir="$(srcdir)/"; fi; \
                    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \

mishandles the assignment to PROG because foo and baz are turned into
.../foo and .../baz, but bar is not.  I spent an hour or two trying to
fix this portably but haven't succeeded yet.

> I think advising users to use GNU make for VPATH builds is fine; I'd
> still like to encourage developers to write portable Makefile.am's
> though, even if it's not easy.

I suppose we could put more encouragement into the documentation, yes.
(Is that what you mean?)  (I'm not encouraged by my experience with
coreutils, though....)

>   AC_C_BACKSLASH_A has only been introduced in 2.54,

That was back when GNU programs still ported to K&R.  It is
obsolescent now, since C89 requires \a.

>   AC_FUNC_LSTAT                                2.50,
>   AC_FUNC_STAT                                 2.50,

As far as I know these macros are useful only for SunOS 4 and
circa 1998 Hurd, but those systems aren't relevant any more.

>   AC_FUNC_STRNLEN                              2.53.

This was a mistake on my part.  Sorry.  (I misread "strnlen" as
"strncpy".)  I installed the patch below to fix it.

>   AC_FUNC_LSTAT has seen changes in 2.53,
>   AC_FUNC_SETVBUF_REVERSED          2.54.

Hmm, what changes were these?

Those macros have seen changes this year, too.  But that doesn't mean
that these macros are still useful.  Often the changes are just to fix
bugs where the macros don't report the correct answer.

>       * lib/autoscan/autoscan.list: Do not suggest obsolescent macros
>       any more.

I'd leave this patch out for now.  Some of the suggestions are still
reasonable (e.g., if you invoke _doprint, you should call
AC_FUNC_VPRINTF, precisely because you're trying to port to K&R).
Others need reworking (e.g., dirent.h should suggest
AC_CHECK_HEADERS).  In the meantime it isn't a bug to suggest
obsolescent macros that still work.

2006-06-05  Paul Eggert  <address@hidden>

        * NEWS: Whoops!  AC_FUNC_STRNLEN isn't obsolescent.  Problem
        reported by Ralf Wildenhues.
        * doc/autoconf.texi (AC_FUNC_STRNLEN): Likewise.

Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.376
diff -p -u -r1.376 NEWS
--- NEWS        4 Jun 2006 07:38:28 -0000       1.376
+++ NEWS        5 Jun 2006 08:38:07 -0000
@@ -41,15 +41,14 @@
   they test for problems that are so old that they are no longer of
   practical importance on current systems.
 
-    AC_C_BACKSLASH_A       AC_FUNC_SELECT_ARGTYPES   AC_HEADER_STAT
-    AC_C_CONST             AC_FUNC_SETPGRP           AC_HEADER_STDC
-    AC_C_PROTOTYPES        AC_FUNC_SETVBUF_REVERSED  AC_HEADER_SYS_WAIT
-    AC_C_STRINGIZE         AC_FUNC_STAT              AC_HEADER_TIME
-    AC_C_VOLATILE          AC_FUNC_STRFTIME          AC_ISC_POSIX
-    AC_FUNC_CLOSEDIR_VOID  AC_FUNC_STRNLEN           AC_PROG_GCC_TRADITIONAL
-    AC_FUNC_GETPGRP        AC_FUNC_UTIME_NULL        AC_STRUCT_TM
-    AC_FUNC_LSTAT          AC_FUNC_VPRINTF
-    AC_FUNC_MEMCMP         AC_HEADER_DIRENT
+    AC_C_BACKSLASH_A       AC_FUNC_MEMCMP            AC_HEADER_DIRENT
+    AC_C_CONST             AC_FUNC_SELECT_ARGTYPES   AC_HEADER_STAT
+    AC_C_PROTOTYPES        AC_FUNC_SETPGRP           AC_HEADER_STDC
+    AC_C_STRINGIZE         AC_FUNC_SETVBUF_REVERSED  AC_HEADER_SYS_WAIT
+    AC_C_VOLATILE          AC_FUNC_STAT              AC_HEADER_TIME
+    AC_FUNC_CLOSEDIR_VOID  AC_FUNC_STRFTIME          AC_ISC_POSIX
+    AC_FUNC_GETPGRP        AC_FUNC_UTIME_NULL        AC_PROG_GCC_TRADITIONAL
+    AC_FUNC_LSTAT          AC_FUNC_VPRINTF           AC_STRUCT_TM
 
   New programs need not use these macros.  We have no current plans to
   remove them.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1039
diff -p -u -r1.1039 autoconf.texi
--- doc/autoconf.texi   5 Jun 2006 08:20:28 -0000       1.1039
+++ doc/autoconf.texi   5 Jun 2006 08:38:08 -0000
@@ -4689,9 +4689,6 @@ If the @code{strtold} function exists an
 @prindex @code{strnlen}
 If the @code{strnlen} function is not available, or is buggy (like the one
 from @acronym{AIX} 4.3), require an @code{AC_LIBOBJ} replacement for it.
-
-This macro is obsolescent, as no current systems have the bug.
-New programs need not use this macro.
 @end defmac
 
 @defmac AC_FUNC_UTIME_NULL




reply via email to

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