Configure: warn about duplicate GENERATE declarations in build.info files
authorRichard Levitte <levitte@openssl.org>
Sun, 10 Jan 2021 08:26:22 +0000 (09:26 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 12 Jan 2021 10:25:54 +0000 (11:25 +0100)
This sort of duplication is permitted, as the end result will be a single
item anyway, but we might as well warn to avoid future confusion.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13824)

Configure

index 87267e2a26e4c9cef7d42db39b00770c5944f20c..ccdb037de2d415bb43dec872e746b485c1445963 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -2325,7 +2325,7 @@ EOF
             if ($generate{$gen}) {
                 $generator[0] = cleanfile($buildd, $gen, $blddir);
             }
-            $check_generate{$ddest}->{$generator[0]} = 1;
+            $check_generate{$ddest}->{$generator[0]}++;
 
             $unified_info{generate}->{$ddest} = [ @generator ];
         }
@@ -2439,6 +2439,9 @@ EOF
             warn "$_ is GENERATEd by more than one generator ($generators_txt)\n";
             $ambiguous_generation++;
         }
+        if ($check_generate{$_}->{$generators[0]} > 1) {
+            warn "INFO: $_ has more than one GENERATE declaration (same generator)\n"
+        }
     }
     die "There are ambiguous source file generations\n"
         if $ambiguous_generation > 0;