autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.69-4-g5


From: Stefano Lattarini
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.69-4-g560f16b
Date: Tue, 22 May 2012 22:13:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=560f16b52d3d3db1536d9ca5b863ce9b1a5c9e35

The branch, master has been updated
       via  560f16b52d3d3db1536d9ca5b863ce9b1a5c9e35 (commit)
      from  7fbb553727ed7e0e689a17594b58559ecf3ea6e9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 560f16b52d3d3db1536d9ca5b863ce9b1a5c9e35
Author: Stefano Lattarini <address@hidden>
Date:   Sun May 6 10:38:01 2012 +0200

    general: deprecate 'configure.in' as autoconf input
    
    It has been years since that has been deprecated in the documentation,
    in favour of 'configure.ac':
    
      Previous versions of Autoconf promoted the name configure.in, which
      is somewhat ambiguous (the tool needed to process this file is not
      described by its extension), and introduces a slight confusion with
      config.h.in and so on (for which '.in' means "to be processed by
      configure"). Using configure.ac is now preferred.
    
    It's now time to start giving runtime warning about the use of
    'configure.in', so that support for it can be removed in future
    versions of autoconf/automake.
    
    * lib/Autom4te/Configure_ac.pm: Issue a warning in the 'obsolete'
    category if 'configure.in' is detected.  Since this module is synced
    from Automake, this change is to be backported there (and will be
    soon).
    * doc/autoconf.texi: Update.
    * tests/tools.at: Adjust to avoid spurious failures.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 NEWS                         |    2 ++
 doc/autoconf.texi            |    9 +++++----
 lib/Autom4te/Configure_ac.pm |   19 ++++++++++---------
 tests/tools.at               |   28 ++++++++++++++--------------
 4 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/NEWS b/NEWS
index 61e3bd2..5429698 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ GNU Autoconf NEWS - User visible changes.
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** The use of the long-deprecated name 'configure.in' for the autoconf
+   input file now elicits a warning in the 'obsolete' category.
 
 * Noteworthy changes in release 2.69 (2012-04-24) [stable]
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 393e38f..3457f12 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1004,10 +1004,9 @@ a file called @file{config.log} containing any messages 
produced by
 compilers, to help debugging if @command{configure} makes a mistake.
 @end itemize
 
address@hidden @file{configure.in}
 @cindex @file{configure.ac}
-To create a @command{configure} script with Autoconf, you need to write an
-Autoconf input file @file{configure.ac} (or @file{configure.in}) and run
+To create a @command{configure} script with Autoconf, you need
+to write an Autoconf input file @file{configure.ac} and run
 @command{autoconf} on it.  If you write your own feature tests to
 supplement those that come with Autoconf, you might also write files
 called @file{aclocal.m4} and @file{acsite.m4}.  If you use a C header
@@ -1095,12 +1094,14 @@ Programming}.  The @command{autoscan} program can give 
you a good start
 in writing @file{configure.ac} (@pxref{autoscan Invocation}, for more
 information).
 
address@hidden @file{configure.in}
 Previous versions of Autoconf promoted the name @file{configure.in},
 which is somewhat ambiguous (the tool needed to process this file is not
 described by its extension), and introduces a slight confusion with
 @file{config.h.in} and so on (for which @samp{.in} means ``to be
 processed by @command{configure}'').  Using @file{configure.ac} is now
-preferred.
+preferred, while the use of @file{configure.in} will cause warnings
+from @command{autoconf}.
 
 @menu
 * Shell Script Compiler::       Autoconf as solution of a problem
diff --git a/lib/Autom4te/Configure_ac.pm b/lib/Autom4te/Configure_ac.pm
index 924b23c..854ee0d 100644
--- a/lib/Autom4te/Configure_ac.pm
+++ b/lib/Autom4te/Configure_ac.pm
@@ -75,19 +75,21 @@ sub find_configure_ac (;@)
   my $configure_in =
     File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in'));
 
-  if (-f $configure_ac)
+  if (-f $configure_in)
     {
-      if (-f $configure_in)
+      msg ('obsolete', "autoconf input should be named 'configure.ac'," .
+                       " not 'configure.in'");
+      if (-f $configure_ac)
        {
          msg ('unsupported',
               "'$configure_ac' and '$configure_in' both present.\n"
               . "proceeding with '$configure_ac'");
+          return $configure_ac
        }
-      return $configure_ac
-    }
-  elsif (-f $configure_in)
-    {
-      return $configure_in;
+      else
+        {
+          return $configure_in;
+        }
     }
   return $configure_ac;
 }
@@ -102,8 +104,7 @@ Like C<find_configure_ac>, but fail if neither is present.
 sub require_configure_ac (;$)
 {
   my $res = find_configure_ac (@_);
-  fatal "'configure.ac' or 'configure.in' is required"
-    unless -f $res;
+  fatal "'configure.ac' is required" unless -f $res;
   return $res
 }
 
diff --git a/tests/tools.at b/tests/tools.at
index 31d4aad..5a9ee63 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -1135,7 +1135,7 @@ AT_SETUP([autoupdating with aclocal and 
m4@&address@hidden)
 AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
 
 mkdir m4 aclocal
-AT_DATA([configure.in],
+AT_DATA([configure.ac],
 [[AC_INIT(x,0)
 AC_UNCHANGED_MACRO
 AC_OLD_MACRO
@@ -1169,7 +1169,7 @@ AT_CHECK([automake --version || exit 77], [], [stdout], 
[ignore])
 AT_CHECK([[grep '[1-9]\.[0-9]' stdout || exit 77]], [], [ignore])
 AT_CHECK([test ! -f $HOME/.autom4te.cfg || exit 77], [], [ignore], [ignore])
 
-AT_DATA([configure.in],
+AT_DATA([configure.ac],
 [[AC_INIT(GNU foo, 1.0)
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
@@ -1294,9 +1294,9 @@ do
   export TMPDIR
 
   # skip if we cannot create such a file or directory
-  AT_CHECK([mkdir "$dir" "$TMPDIR" && touch "$file.in" || exit 77])
+  AT_CHECK([mkdir "$dir" "$TMPDIR" && touch "$file.ac" || exit 77])
 
-  cat >"$file.in" <<'END'
+  cat >"$file.ac" <<'END'
 [AC_INIT(x,0)
 m4@&address@hidden([foo.m4])
 AC_CONFIG_HEADERS([config.h:config.hin])
@@ -1307,20 +1307,20 @@ END
 [AC_DEFUN([AC_MACRO], [echo hi])]
 END
 
-  AT_CHECK_AUTOHEADER([-B "$dir" "$file.in"])
-  AT_CHECK_AUTOHEADER([--force -I "$dir" "$file.in"])
-  AT_CHECK_AUTOUPDATE([-B "$dir" "$file.in"])
-  AT_CHECK_AUTOUPDATE([--force -I "$dir" "$file.in"])
-  AT_CHECK_AUTOUPDATE([-B "$dir" - < "$file.in"], [], [ignore])
-  AT_CHECK_AUTOCONF([-B "$dir" -o "$file" "$file.in"])
-  AT_CHECK_AUTOCONF([-I "$dir" -o "$file" "$file.in"])
+  AT_CHECK_AUTOHEADER([-B "$dir" "$file.ac"])
+  AT_CHECK_AUTOHEADER([--force -I "$dir" "$file.ac"])
+  AT_CHECK_AUTOUPDATE([-B "$dir" "$file.ac"])
+  AT_CHECK_AUTOUPDATE([--force -I "$dir" "$file.ac"])
+  AT_CHECK_AUTOUPDATE([-B "$dir" - < "$file.ac"], [], [ignore])
+  AT_CHECK_AUTOCONF([-B "$dir" -o "$file" "$file.ac"])
+  AT_CHECK_AUTOCONF([-I "$dir" -o "$file" "$file.ac"])
   # In autoconf, these exercise a slightly different code path:
-  AT_CHECK_AUTOCONF([--prepend-include="$dir" -o "$file" "$file.in"])
-  AT_CHECK_AUTOCONF([--include="$dir" -o "$file" "$file.in"])
+  AT_CHECK_AUTOCONF([--prepend-include="$dir" -o "$file" "$file.ac"])
+  AT_CHECK_AUTOCONF([--include="$dir" -o "$file" "$file.ac"])
   AT_CHECK([autoscan -B "$dir"], [], [], [ignore])
   AT_CHECK([autoscan --force -I "$dir"], [], [], [ignore])
   # autoreconf requires a sane input file name.  Also, disable aclocal.
-  mv -f "$file.in" configure.in
+  mv -f "$file.ac" configure.ac
   AT_DATA([aclocal.m4])
   AT_CHECK([autoreconf -B "$dir"])
   AT_CHECK([autoreconf --force -I "$dir"])


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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