]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Fix for PR automake/303:
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 7 Mar 2002 21:06:29 +0000 (21:06 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 7 Mar 2002 21:06:29 +0000 (21:06 +0000)
* automake.in (version_check): Move the error message ...
(process_option_list): ... here, so we can distinguish between
global and local options.

ChangeLog
automake.in

index 84b1b4aa59b6377de991479e69d110585f505f3e..724b052e5a189e7aab7220aeaa73eef905ff446a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-07  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       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  <duret_g@epita.fr>
 
        * tests/pr300-lib.test, tests/pr300-ltlib.test,
index c7fe80db5a5ee04d3b1b8ea46a89ea1cab3f08f2..92a2ba756c5e1eae195249ecb92164aee84f8d23 100755 (executable)
@@ -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;
            }
        }