From a1ede7d08d0c8ec21fabff083960d6794048eed5 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 14 May 2004 22:44:42 +0000 Subject: [PATCH] * automake.in (parse_arguments, MAIN): Give more precise diagnostics when not input file is found. * tests/output5.test: Adjust. Suggested by Jens Petersen. --- ChangeLog | 7 +++++++ automake.in | 15 ++++++++++++--- tests/output5.test | 5 +++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f64dab25..e55b80fdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-05-15 Alexandre Duret-Lutz + + * automake.in (parse_arguments, MAIN): Give more precise + diagnostics when not input file is found. + * tests/output5.test: Adjust. + Suggested by Jens Petersen. + 2004-05-14 Alexandre Duret-Lutz * lib/am/libs.am (AR, ARFLAGS): Move these definition ... diff --git a/automake.in b/automake.in index e4f2fedde..97e0cb705 100755 --- a/automake.in +++ b/automake.in @@ -7363,6 +7363,7 @@ sub parse_arguments () $output_directory = '.'; } + my $errspec = 0; foreach my $arg (@ARGV) { if ($arg =~ /^-./) @@ -7382,9 +7383,12 @@ sub parse_arguments () } 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; } ################################################################ @@ -7400,8 +7404,13 @@ $configure_ac = require_configure_ac; # 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"); + } # Now do all the work on each file. foreach my $file (@input_files) diff --git a/tests/output5.test b/tests/output5.test index aa6d349c4..5ba0cdf1a 100755 --- a/tests/output5.test +++ b/tests/output5.test @@ -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 @@ END $ACLOCAL AUTOMAKE_fails -grep 'found or specified' stderr +grep 'AC_CONFIG_FILES(.Makefile.)' stderr -- 2.47.2