- }
- close IN;
-
- my($conf_opts, %regenerate);
- open(IN, "../$diff") or die $!;
- while (<IN>) {
- if (!defined $conf_opts) {
- if (m#^\s*\./configure( .+)#) {
- $conf_opts = $1;
- $conf_opts =~ s/\s+\(.*?\)//;
- } elsif (/^--- /) {
- $conf_opts = '';
- }
- }
- if (m#^--- orig/([^\t]+)#) {
- my $patching = $1;
- while (my($fn, $re) = each %generated_files) {
- if ($patching =~ /$re/) {
- $regenerate{$fn} = 1;
- }
- }
+ if (!defined($conf_opts) && s#^\s+\./configure\s+##) {
+ chomp($conf_opts = $_);
+ $conf_opts =~ s/\s*\(.*?\)//;