From 3fafafa93773a5c9e4e83060c2e06d1bf91d8beb Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 23 Apr 2001 18:16:13 +0000 Subject: [PATCH] Files with special characters may not have been renamed. Try to match both forms. --- tools/winemaker | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/winemaker b/tools/winemaker index 6e79e11d3d0..58d7f3b70ce 100755 --- a/tools/winemaker +++ b/tools/winemaker @@ -1127,10 +1127,20 @@ sub search_from $dirname=dirname($dirname) . "/"; $real_path.="../"; } else { + # The file/directory may have been renamed before. Also try to + # match the renamed file. + my $renamed=$component; + $renamed =~ s/[ \$]/_/g; + if ($renamed eq $component) { + undef $renamed; + } + my $directory=get_directory_contents $dirname; my $found; foreach $dentry (@$directory) { - if ($dentry =~ /^$component$/i) { + if ($dentry =~ /^$component$/i or + (defined $renamed and $dentry =~ /^$renamed$/i) + ) { $dirname.="$dentry/"; $real_path.="$dentry/"; $found=1; @@ -1175,14 +1185,12 @@ sub get_real_include_name } } else { # Here's how we proceed: - # - compute the 'renamed' filename (see renaming phase) # - split the filename we look for into its components # - then for each directory in the include path # - trace the directory components starting from that directory # - if we fail to find a match at any point then continue with # the next directory in the include path # - otherwise, rejoice, our quest is over. - $filename =~ s/[ \$]/_/g; my @file_components=split /[\/\\]+/, $filename; #print " Searching for $filename from @$project[$P_PATH]\n"; @@ -1583,7 +1591,7 @@ sub generate_spec_file } my $rcname=@{@$target[$T_SOURCES_RC]}[0]; $rcname =~ s+\.rc$++i; - $rcname =~ s+([^/\w])+\\\1+g; + $rcname =~ s+([^/\w])+\\$1+g; print FILEO "rsrc $rcname.res\n"; } print FILEO "\n";