bug-automake
[Top][All Lists]
Advanced

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

Re: "automake: no `Makefile.am' found or specified"


From: Alexandre Duret-Lutz
Subject: Re: "automake: no `Makefile.am' found or specified"
Date: Sat, 15 May 2004 00:44:09 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Jens" == Jens Petersen <address@hidden> writes:

 Jens> When Makefile is missing from the AC_OUTPUT list in
 Jens> configure.{ac,in}, automake gives the error

 Jens> automake: no `Makefile.am' found or specified

 Jens> even though Makefile.am does exist... which is rather
 Jens> confusing to say the least.  It would be nice if the error
 Jens> handling for this case could be made more precise.  IMO the
 Jens> above error message should only appear when no Makefile.am
 Jens> present.

Ok, I'm installing the following on HEAD and branch-1-8.

2004-05-15  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (parse_arguments, MAIN): Give more precise
        diagnostics when not input file is found.
        * tests/output5.test: Adjust.
        Suggested by Jens Petersen.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1526.2.13
diff -u -r1.1526.2.13 automake.in
--- automake.in 14 May 2004 20:14:13 -0000      1.1526.2.13
+++ automake.in 14 May 2004 22:41:43 -0000
@@ -7132,6 +7132,7 @@
       $output_directory = '.';
     }
 
+  my $errspec = 0;
   foreach my $arg (@ARGV)
     {
       if ($arg =~ /^-./)
@@ -7151,9 +7152,12 @@
        }
       else
        {
-         error "no Automake input file found in `$arg'";
+         error "no Automake input file found for `$arg'";
+         $errspec = 1;
        }
     }
+  fatal "no input file found among supplied arguments"
+    if $errspec && ! @input_files;
 }
 
 ################################################################
@@ -7169,8 +7173,13 @@
 # Do configure.ac scan only once.
 scan_autoconf_files;
 
-fatal "no `Makefile.am' found or specified\n"
-  if ! @input_files;
+if (! @input_files)
+  {
+    my $msg = '';
+    $msg = "\nDid you forget AC_CONFIG_FILES([Makefile]) in $configure_ac?"
+      if -f 'Makefile.am';
+    fatal ("no `Makefile.am' found for any configure output$msg");
+  }
 
 my $automake_has_run = 0;
 
Index: tests/output5.test
===================================================================
RCS file: /cvs/automake/automake/tests/output5.test,v
retrieving revision 1.8
diff -u -r1.8 output5.test
--- tests/output5.test  3 Jul 2003 18:58:50 -0000       1.8
+++ tests/output5.test  14 May 2004 22:41:43 -0000
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004  Free Software
+#   Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -34,4 +35,4 @@
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'found or specified' stderr
+grep 'AC_CONFIG_FILES(.Makefile.)' stderr

-- 
Alexandre Duret-Lutz





reply via email to

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