From 709572371df894ed28ea145eadba7d7081c22992 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 7 Mar 2002 21:06:29 +0000 Subject: [PATCH] Fix for PR automake/303: * automake.in (version_check): Move the error message ... (process_option_list): ... here, so we can distinguish between global and local options. --- ChangeLog | 7 +++++++ automake.in | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84b1b4aa..724b052e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-03-07 Alexandre Duret-Lutz + + Fix for PR automake/303: + * automake.in (version_check): Move the error message ... + (process_option_list): ... here, so we can distinguish between + global and local options. + 2002-03-07 Alexandre Duret-Lutz * tests/pr300-lib.test, tests/pr300-ltlib.test, diff --git a/automake.in b/automake.in index c7fe80db..92a2ba75 100755 --- a/automake.in +++ b/automake.in @@ -1420,8 +1420,6 @@ sub version_check ($$$$) && $ralpha gt $talpha) || ($rfork ne '' && $rfork ne $tfork)) { - macro_error ('AUTOMAKE_OPTIONS', - "require version $_, but have $VERSION"); return 1; } @@ -1474,6 +1472,19 @@ sub process_option_list # Got a version number. if (version_check ($1, $2, $3, $4)) { + if ($config) + { + file_error ($seen_init_automake, + "require version $_, but have $VERSION"); + # Arrange to process this global option only once, otherwise + # the error message would be printed for each Makefile. + $global_options =~ s/(?:^| )$_(?: |$)/ /g; + } + else + { + macro_error ('AUTOMAKE_OPTIONS', + "require version $_, but have $VERSION"); + } return 1; } } -- 2.43.5