automake
[Top][All Lists]
Advanced

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

74-me.patch


From: Akim Demaille
Subject: 74-me.patch
Date: Sun, 25 Feb 2001 22:43:33 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in ($me): New.
        Use it.
        (&usage): Display your full name.
        
        
Index: automake.in
--- automake.in Sun, 25 Feb 2001 14:19:25 +0100 akim (am/f/39_automake.i 1.80 
755)
+++ automake.in Sun, 25 Feb 2001 14:53:29 +0100 akim (am/f/39_automake.i 1.80 
755)
@@ -29,6 +29,8 @@
 
 require 5.005;
 
+(my $me = $0) =~ s,.*[\\/],,;
+
 # Parameters set by configure.  Not to be changed.  NOTE: assign
 # VERSION as string so that eg version 0.30 will print correctly.
 my $VERSION = "@VERSION@";
@@ -394,7 +396,7 @@
 # Do configure.ac scan only once.
 &scan_autoconf_files;
 
-die "automake: no \`Makefile.am' found or specified\n"
+die "$me: no \`Makefile.am' found or specified\n"
     if ! @input_files;
 
 # Now do all the work on each file.
@@ -423,7 +425,7 @@
 # Signal a programming error, display PRINT-ME, and exit 1.
 sub prog_error (@)
 {
-    print STDERR "automake: programming error: @_\n";
+    print STDERR "$me: programming error: @_\n";
     exit 1;
 }
 
@@ -551,7 +553,7 @@ sub parse_arguments ()
          # automake input file is found.  Maybe not the best way, but
          # it is easy to explain.
          $input =~ s/\.in$//
-           or die "automake: invalid input file name \`$arg'\n.";
+           or die "$me: invalid input file name \`$arg'\n.";
        }
       push (@input_files, $input);
       $output_files{$input} = join (':', ($local, @rest));
@@ -699,11 +701,11 @@ sub generate_makefile
 
     if (! open (GM_FILE, "> " . $out_file))
     {
-       warn "automake: ${am_file}.in: cannot write: $!\n";
+       warn "$me: ${am_file}.in: cannot write: $!\n";
        $exit_status = 1;
        return;
     }
-    print "automake: creating ", $makefile, ".in\n" if $verbose;
+    print "$me: creating ", $makefile, ".in\n" if $verbose;
 
     # In case we're running under MSWindows, don't write with CRLF
     # (as it causes problems for the dependency-file extraction in
@@ -719,7 +721,7 @@ sub generate_makefile
 
     if (! close (GM_FILE))
       {
-       warn "automake: $am_file.in: cannot close: $!\n";
+       warn "$me: $am_file.in: cannot close: $!\n";
        $exit_status = 1;
        return;
       }
@@ -2158,7 +2160,7 @@ sub scan_texinfo_file
        &am_error ("couldn't open \`$filename': $!");
        return '';
     }
-    print "automake: reading $filename\n" if $verbose;
+    print "$me: reading $filename\n" if $verbose;
 
     my ($outfile, $vfile);
     while (<TEXI>)
@@ -3992,8 +3994,8 @@ sub scan_autoconf_traces
     $traces .= ' -t AC_SUBST';
 
     open (TRACES, "$traces |")
-       || die "automake: couldn't open \`$traces': $!\n";
-    print "automake: reading $traces\n" if $verbose;
+       || die "$me: couldn't open \`$traces': $!\n";
+    print "$me: reading $traces\n" if $verbose;
 
     while (<TRACES>)
     {
@@ -4031,7 +4033,7 @@ sub scan_autoconf_traces
     }
 
     close (TRACES)
-      || die "automake: close: $traces: $!\n";
+      || die "$me: close: $traces: $!\n";
 }
 
 
@@ -4045,8 +4047,8 @@ sub scan_one_autoconf_file
     local *CONFIGURE;
 
     open (CONFIGURE, $filename)
-       || die "automake: couldn't open \`$filename': $!\n";
-    print "automake: reading $filename\n" if $verbose;
+       || die "$me: couldn't open \`$filename': $!\n";
+    print "$me: reading $filename\n" if $verbose;
 
 
     my ($in_ac_output, $in_ac_replace) = (0, 0);
@@ -4387,14 +4389,14 @@ sub scan_autoconf_files
     local %make_list;
     local @make_input_list;
 
-    warn "automake: both \`configure.ac' and \`configure.in' present:"
+    warn "$me: both \`configure.ac' and \`configure.in' present:"
          . " ignoring \`configure.in'\n"
         if -f 'configure.ac' && -f 'configure.in';
     $configure_ac = 'configure.in'
         if -f 'configure.in';
     $configure_ac = 'configure.ac'
         if -f 'configure.ac';
-    die "automake: \`configure.ac' or \`configure.in' is required\n"
+    die "$me: \`configure.ac' or \`configure.in' is required\n"
         if !$configure_ac;
 
     &scan_one_autoconf_file ($configure_ac);
@@ -4403,8 +4405,8 @@ sub scan_autoconf_files
 
     if (defined $ENV{'amtraces'})
     {
-        warn 'automake: Autoconf traces is an experimental feature';
-        warn 'automake: use at your own risks';
+        warn '$me: Autoconf traces is an experimental feature';
+        warn '$me: use at your own risks';
 
         &scan_autoconf_traces ($configure_ac);
     }
@@ -5839,8 +5841,8 @@ sub read_am_file
     my ($amfile) = @_;
     local *AM_FILE;
 
-    open (AM_FILE, $amfile) || die "automake: couldn't open \`$amfile': $!\n";
-    print "automake: reading $amfile\n" if $verbose;
+    open (AM_FILE, $amfile) || die "$me: couldn't open \`$amfile': $!\n";
+    print "$me: reading $amfile\n" if $verbose;
 
     my $spacing = '';
     my $comment = '';
@@ -6576,9 +6578,9 @@ sub file_contents
     # Swallow the file and applied the COMMAND.
     my $file = $am_dir . '/' . $basename . '.am';
     open (FC_FILE, $file)
-       || die "automake: installation error: cannot open \`$file'\n";
+       || die "$me: installation error: cannot open \`$file'\n";
     # Looks stupid?
-    # print "automake: reading $file\n" if $verbose;
+    # print "$me: reading $file\n" if $verbose;
 
     # Swallow into $CONTENTS the whole content of the file, after
     # having performed the $COMMAND, and removed Automake comments.
@@ -7410,7 +7412,7 @@ sub set_strictness
     }
     else
     {
-       die "automake: level \`$strictness_name' not recognized\n";
+       die "$me: level \`$strictness_name' not recognized\n";
     }
 }
 
@@ -7469,7 +7471,7 @@ sub unquote_m4_arg
 # Print an error message and set exit status.
 sub am_error
 {
-    warn "automake: ${am_file}.am: @_\n";
+    warn "$me: ${am_file}.am: @_\n";
     $exit_status = 1;
 }
 
@@ -7526,7 +7528,7 @@ sub am_line_error
 sub am_conf_error
 {
     # FIXME: can run in subdirs.
-    warn "automake: $configure_ac: @_\n";
+    warn "$me: $configure_ac: @_\n";
     $exit_status = 1;
 }
 
@@ -7559,16 +7561,16 @@ sub am_conf_line_warning
 sub keyed_aclocal_warning
 {
     my ($key) = @_;
-    warn "automake: macro \`$key' can be generated by \`aclocal'\n";
+    warn "$me: macro \`$key' can be generated by \`aclocal'\n";
 }
 
 # Print usage information.
 sub usage
 {
     print <<EOF;
-Usage: automake [OPTION] ... [Makefile]...
+Usage: $0 [OPTION] ... [Makefile]...
 
-Generate Makefile.in for configure from Makefile.am
+Generate Makefile.in for configure from Makefile.am.
 
 Operation modes:
   -h, --help             print this help, then exit



reply via email to

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