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.61a-388


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-388-g97a9120
Date: Mon, 17 Mar 2008 06:01:07 +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=97a91204c0049588bddf28d9433e849a748dd08b

The branch, master has been updated
       via  97a91204c0049588bddf28d9433e849a748dd08b (commit)
      from  4c32cbb30fc40d9f72935781eaa22c53c9899cf3 (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 97a91204c0049588bddf28d9433e849a748dd08b
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Mar 17 06:58:49 2008 +0100

    Provide a helpful message if autopoint or libtoolize do not exist.
    
    * lib/Autom4te/FileUtils.pm (handle_exec_errors): New argument
    $hint, show if the executing program does not exist.
    (xsystem_hint): New function, like xsystem but allows to pass
    a hint.
    * bin/autoreconf.in: Use xsystem_hint for spawning autopoint and
    libtoolize.
    Report by Bruce Korb.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                 |   10 ++++++++++
 bin/autoreconf.in         |    4 ++--
 lib/Autom4te/FileUtils.pm |   42 +++++++++++++++++++++++++++++++++++-------
 3 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index df83bce..b017fcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-03-17  Ralf Wildenhues  <address@hidden>
+
+       * lib/Autom4te/FileUtils.pm (handle_exec_errors): New argument
+       $hint, show if the executing program does not exist.
+       (xsystem_hint): New function, like xsystem but allows to pass
+       a hint.
+       * bin/autoreconf.in: Use xsystem_hint for spawning autopoint and
+       libtoolize.
+       Report by Bruce Korb.
+
 2008-03-14  Stepan Kasal  <address@hidden>
 
        * lib/Autom4te/ChannelDefs.pm, tests/fortran.at,
diff --git a/bin/autoreconf.in b/bin/autoreconf.in
index 66da78e..4ff8fb9 100644
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -364,7 +364,7 @@ sub autoreconf_current_directory ()
     }
   else
     {
-      xsystem "$autopoint";
+      xsystem_hint ("autopoint is needed because this package uses Gettext", 
"$autopoint");
     }
 
 
@@ -528,7 +528,7 @@ sub autoreconf_current_directory ()
        {
          $libtoolize .= " --ltdl";
        }
-      xsystem ($libtoolize);
+      xsystem_hint ("libtoolize is needed because this package uses Libtool", 
$libtoolize);
       $rerun_aclocal = 1;
     }
   else
diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
index 819a7c3..ac56fd3 100644
--- a/lib/Autom4te/FileUtils.pm
+++ b/lib/Autom4te/FileUtils.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, 
Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ use vars qw (@ISA @EXPORT);
 @EXPORT = qw (&open_quote &contents
              &find_file &mtime
              &update_file &up_to_date_p
-             &xsystem &xqx &dir_has_case_matching_file &reset_dir_cache);
+             &xsystem &xsystem_hint &xqx &dir_has_case_matching_file 
&reset_dir_cache);
 
 
 =item C<open_quote ($file_name)>
@@ -231,23 +231,32 @@ sub up_to_date_p ($@)
 }
 
 
-=item C<handle_exec_errors ($command, [$expected_exit_code = 0])>
+=item C<handle_exec_errors ($command, [$expected_exit_code = 0], [$hint])>
 
 Display an error message for C<$command>, based on the content of
 C<$?> and C<$!>.  Be quiet if the command exited normally
-with C<$expected_exit_code>.
+with C<$expected_exit_code>.  If C<$hint> is given, display that as well
+if the command failed to run at all.
 
 =cut
 
-sub handle_exec_errors ($;$)
+sub handle_exec_errors ($;$$)
 {
-  my ($command, $expected) = @_;
+  my ($command, $expected, $hint) = @_;
   $expected = 0 unless defined $expected;
+  if (defined $hint)
+    {
+      $hint = "\n" . $hint;
+    }
+  else
+    {
+      $hint = '';
+    }
 
   $command = (split (' ', $command))[0];
   if ($!)
     {
-      fatal "failed to run $command: $!";
+      fatal "failed to run $command: $!" . $hint;
     }
   else
     {
@@ -316,6 +325,25 @@ sub xsystem (@)
 }
 
 
+=item C<xsystem_hint ($msg, @argv)>
+
+Same as C<xsystem>, but allows to pass a hint that will be displayed
+in case the command failed to run at all.
+
+=cut
+
+sub xsystem_hint (@)
+{
+  my ($hint, @command) = @_;
+
+  verb "running: @command";
+
+  $! = 0;
+  handle_exec_errors "@command", 0, $hint
+    if system @command;
+}
+
+
 =item C<contents ($file_name)>
 
 Return the contents of C<$file_name>.


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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