From: Alexandre Duret-Lutz Date: Thu, 7 Mar 2002 21:06:29 +0000 (+0000) Subject: Fix for PR automake/303: X-Git-Tag: branchpoint-1-6~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbee9334f834ad07d2499f18ac3342ab43797043;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index 84b1b4aa5..724b052e5 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 c7fe80db5..92a2ba756 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; } }