makefiles: Add support in make_makefiles for flags in sfd files.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2015-11-10 18:09:19 +09:00
parent a3fcb8dc88
commit fabc25d8b7
2 changed files with 30 additions and 10 deletions

View File

@ -11,7 +11,3 @@ FONT_SRCS = \
tahoma.sfd \ tahoma.sfd \
tahomabd.sfd \ tahomabd.sfd \
wingding.sfd wingding.sfd
# Make sure that make_makefiles sees the generated rules
install install-lib::
clean::

View File

@ -266,13 +266,32 @@ sub get_makedep_flags($)
my %flags; my %flags;
open FILE, $file or die "cannot open $file"; open FILE, $file or die "cannot open $file";
while (<FILE>) if ($file =~ /\.sfd$/)
{ {
next unless /^#\s*pragma\s+makedep\s+(.*)/; while (<FILE>)
foreach my $flag (split /\s+/, $1)
{ {
last if $flag eq "depend"; next unless /^UComments:\s*\"(.*)\"$/;
$flags{$flag} = 1; foreach my $pragma (split /\+AAoA/, $1)
{
next unless $pragma =~ /^#\s*pragma\s+makedep\s+(.*)/;
foreach my $flag (split /\s+/, $1)
{
$flags{$flag} = 1;
last if $flag eq "font";
}
}
}
}
else
{
while (<FILE>)
{
next unless /^#\s*pragma\s+makedep\s+(.*)/;
foreach my $flag (split /\s+/, $1)
{
last if $flag eq "depend";
$flags{$flag} = 1;
}
} }
} }
close FILE; close FILE;
@ -342,7 +361,12 @@ sub assign_sources_to_makefiles(@)
elsif ($name =~ /\.rh$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; } elsif ($name =~ /\.rh$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; }
elsif ($name =~ /\.inl$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; } elsif ($name =~ /\.inl$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; }
elsif ($name =~ /\.svg$/) { push @{${$make}{"=SVG_SRCS"}}, $name; } elsif ($name =~ /\.svg$/) { push @{${$make}{"=SVG_SRCS"}}, $name; }
elsif ($name =~ /\.sfd$/) { push @{${$make}{"=FONT_SRCS"}}, $name; } elsif ($name =~ /\.sfd$/)
{
${${$make}{"=flags"}}{"clean"} = 1 if defined $flags{"font"};
${${$make}{"=flags"}}{"install-lib"} = 1 if defined $flags{"install"};
push @{${$make}{"=FONT_SRCS"}}, $name;
}
elsif ($name =~ /\.c$/) elsif ($name =~ /\.c$/)
{ {
${${$make}{"=flags"}}{"staticimplib"} = 1 if defined $flags{"implib"}; ${${$make}{"=flags"}}{"staticimplib"} = 1 if defined $flags{"implib"};