Alexandre Julliard : makefiles: Add support in make_makefiles for flags in sfd files.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 10 10:36:20 CST 2015
Module: wine
Branch: master
Commit: fabc25d8b7d51f2315deed048a0713cfcc8f97cb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fabc25d8b7d51f2315deed048a0713cfcc8f97cb
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Nov 10 18:09:19 2015 +0900
makefiles: Add support in make_makefiles for flags in sfd files.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
fonts/Makefile.in | 4 ----
tools/make_makefiles | 36 ++++++++++++++++++++++++++++++------
2 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/fonts/Makefile.in b/fonts/Makefile.in
index 9d4ea9f..08c8264 100644
--- a/fonts/Makefile.in
+++ b/fonts/Makefile.in
@@ -11,7 +11,3 @@ FONT_SRCS = \
tahoma.sfd \
tahomabd.sfd \
wingding.sfd
-
-# Make sure that make_makefiles sees the generated rules
-install install-lib::
-clean::
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 3c14751..b7f8b63 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -266,13 +266,32 @@ sub get_makedep_flags($)
my %flags;
open FILE, $file or die "cannot open $file";
- while (<FILE>)
+ if ($file =~ /\.sfd$/)
{
- next unless /^#\s*pragma\s+makedep\s+(.*)/;
- foreach my $flag (split /\s+/, $1)
+ while (<FILE>)
{
- last if $flag eq "depend";
- $flags{$flag} = 1;
+ next unless /^UComments:\s*\"(.*)\"$/;
+ 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;
@@ -342,7 +361,12 @@ sub assign_sources_to_makefiles(@)
elsif ($name =~ /\.rh$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; }
elsif ($name =~ /\.inl$/) { push @{${$make}{"=HEADER_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$/)
{
${${$make}{"=flags"}}{"staticimplib"} = 1 if defined $flags{"implib"};
More information about the wine-cvs
mailing list