autoconf-patches
[Top][All Lists]
Advanced

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

FYI: Use fatal in autom4te


From: Akim Demaille
Subject: FYI: Use fatal in autom4te
Date: Thu, 04 Sep 2003 15:02:54 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Noticed some output during "make".

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * bin/autom4te.in: Use &fatal where more appropriate than &error.
        (freeze): When exiting, use $exit_code.
        * lib/autoconf/fortran.m4: Comment changes.

Index: bin/autom4te.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autom4te.in,v
retrieving revision 1.89
diff -u -u -r1.89 autom4te.in
--- bin/autom4te.in 22 Aug 2003 13:38:34 -0000 1.89
+++ bin/autom4te.in 4 Sep 2003 12:59:58 -0000
@@ -89,7 +89,7 @@
 # $M4.
 my $m4 = $ENV{"M4"} || '@M4@';
 # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-error "need GNU m4 1.4 or later: $m4"
+fatal "need GNU m4 1.4 or later: $m4"
   if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
 
 # Set some high recursion limit as the default limit, 250, has already
@@ -269,7 +269,7 @@
       my $type = shift @words;
       if ($type eq 'begin-language:')
        {
-         error "$file:$.: end-language missing for: $lang"
+         fatal "$file:$.: end-language missing for: $lang"
            if defined $lang;
          $lang = lc $words[0];
        }
@@ -281,7 +281,7 @@
        }
       elsif ($type eq 'args:')
        {
-         error "$file:$.: no current language"
+         fatal "$file:$.: no current language"
            unless defined $lang;
          push @{$language{$lang}}, @words;
        }
@@ -360,7 +360,7 @@
      "no-cache"  => sub { $cache = undef; },
     );
 
-  error "too few arguments
+  fatal "too few arguments
 Try `$me --help' for more information."
     unless @ARGV;
 
@@ -369,7 +369,7 @@
   # And it implies melting: there is risk not to update properly using
   # old frozen files, and worse yet: we could load a frozen file and
   # refreeze it!  A sort of caching :)
-  error "cannot freeze and trace"
+  fatal "cannot freeze and trace"
     if $freeze && @trace;
   $melt = 1
     if $freeze;
@@ -472,7 +472,7 @@
     {
       use File::Copy;
       move ("${file}t", "$file")
-       or error "cannot not rename ${file}t as $file: $!";
+       or fatal "cannot not rename ${file}t as $file: $!";
     }
 }
 
@@ -548,7 +548,7 @@
     {
       $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode));
     }
-  error "cannot create $output: $!"
+  fatal "cannot create $output: $!"
     unless $out;
   my $in = new Autom4te::XFile ($ocache . $req->id);
 
@@ -922,7 +922,7 @@
   $result =~ s/#.*\n//g;
   $result =~ s/^\n//mg;
 
-  error "freezing produced output:\n$result"
+  fatal "freezing produced output:\n$result"
     if $result;
 
   # If freezing produces output, something went wrong: a bad `divert',
@@ -951,14 +951,14 @@
 if ($freeze)
   {
     freeze ($output);
-    exit 0;
+    exit $exit_code;
   }
 
 # We need our cache directory.
 if (! -d "$cache")
   {
     mkdir "$cache", 0755
-      or error "cannot create $cache: $!";
+      or fatal "cannot create $cache: $!";
   }
 
 # Open the index for update, and lock it.  autom4te handles several
Index: lib/autoconf/fortran.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/fortran.m4,v
retrieving revision 1.168
diff -u -u -r1.168 fortran.m4
--- lib/autoconf/fortran.m4 4 Sep 2003 12:52:36 -0000 1.168
+++ lib/autoconf/fortran.m4 4 Sep 2003 12:59:59 -0000
@@ -1094,7 +1094,7 @@
 #
 # For ordinary extensions like f90, etcetera, the modified FCFLAGS
 # are currently needed for IBM's xlf* and Intel's ifc (grrr).  Unfortunately,
-* xlf* will only take flags to recognize one extension at a time, so if the
+# xlf* will only take flags to recognize one extension at a time, so if the
 # user wants to compile multiple extensions (.f90 and .f95, say), she
 # will need to use the FCFLAGS_F90 and FCFLAGS_F95 individually rather
 # than just adding them all to FCFLAGS, for example.
Index: man/autom4te.1
===================================================================
RCS file: /cvsroot/autoconf/autoconf/man/autom4te.1,v
retrieving revision 1.59
diff -u -u -r1.59 autom4te.1
--- man/autom4te.1 24 Aug 2003 12:05:21 -0000 1.59
+++ man/autom4te.1 4 Sep 2003 13:00:00 -0000
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33.
-.TH AUTOM4TE "1" "August 2003" "autom4te 2.57c" "User Commands"
+.TH AUTOM4TE "1" "September 2003" "autom4te 2.57c" "User Commands"
 .SH NAME
 autom4te \- Generate files and scripts thanks to M4
 .SH SYNOPSIS




reply via email to

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