made filelist.txt more readable

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-04 16:07:51 +00:00
parent 21b6ad64da
commit b9cc8004c0
3 changed files with 1272 additions and 1228 deletions

View File

@@ -19,62 +19,83 @@
#! print STDERR "Processing line: '$_'\n"; #! print STDERR "Processing line: '$_'\n";
#! } #! }
my @fields = split "\t"; my @fields = split /\t/;
#! first column is filename, second is type, third is flags
my ($filename, $filetype, $fileflags) = @fields;
if ( $#fields > 2 ) { if ( $#fields > 2 ) {
warn "Ignoring malformed line $_ in the filelist file.\n"; warn "Ignoring malformed line $_ in the filelist file.\n";
next line; next line;
} elsif ( $#fields == 1 ) { } elsif ( $#fields == 1 ) {
#! add an empty flags string #! add an empty flags string
$fields[2] = ""; $fileflags = "";
} }
if ( $verbose ) { if ( $verbose ) {
print STDERR "File $fields[0]: type '$fields[1]', flags '$fields[2]'\n"; print STDERR "File $filename: type '$filetype', flags '$fileflags'\n";
} }
#! first column is filename, second is type, third is flags #! this is a bit stupid but all templates are written using the old
if ( $fields[1] eq "C" ) { #! single letter flags which became so unreadable that I decided to
$wxCommon{$fields[0]} = $fields[2]; #! replace them with more readable strings, but it was easier to do
} elsif ( $fields[1] eq "G" ) { #! the translation here instead of changing all *.t files
$wxGeneric{$fields[0]} = $fields[2]; $fileflags =~ s/Base/B/;
} elsif ( $fields[1] eq "M" ) { $fileflags =~ s/NotWin32/16/;
$wxMSW{$fields[0]} = $fields[2]; $fileflags =~ s/Win32Only/32/;
} elsif ( $fields[1] eq "X" ) { $fileflags =~ s/Generic/G/;
$wxMOTIF{$fields[0]} = $fields[2]; $fileflags =~ s/OLE/O/;
} elsif ( $fields[1] eq "R" ) { $fileflags =~ s/Socket/S/;
$wxGTK{$fields[0]} = $fields[2]; $fileflags =~ s/NotMSW/U/;
} elsif ( $fields[1] eq "V" ) { $fileflags =~ s/NotGTK/R/;
$wxUNIV{$fields[0]} = $fields[2]; $fileflags =~ s/NotX/X/;
} elsif ( $fields[1] eq "Z" ) { $fileflags =~ s/NotOS2/P/;
$wxMGL{$fields[0]} = $fields[2]; $fileflags =~ s/LowLevel/L/;
} elsif ( $fields[1] eq "O" ) {
$wxOS2PM{$fields[0]} = $fields[2]; if ( $filetype eq "Common" ) {
} elsif ( $fields[1] eq "H" ) { $wxCommon{$filename} = $fileflags;
$wxHTML{$fields[0]} = $fields[2]; } elsif ( $filetype eq "Generic" ) {
} elsif ( $fields[1] eq "U" ) { $wxGeneric{$filename} = $fileflags;
$wxUNIX{$fields[0]} = $fields[2]; } elsif ( $filetype eq "MSW" ) {
} elsif ( $fields[1] eq "B" ) { $wxMSW{$filename} = $fileflags;
$wxBase{$fields[0]} = $fields[2]; } elsif ( $filetype eq "Motif" ) {
} elsif ( $fields[1] eq "W" ) { $wxMOTIF{$filename} = $fileflags;
$wxWXINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "GTK" ) {
} elsif ( $fields[1] eq "P" ) { $wxGTK{$filename} = $fileflags;
$wxPROTOCOLINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "Univ" ) {
} elsif ( $fields[1] eq "L" ) { $wxUNIV{$filename} = $fileflags;
$wxHTMLINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "MGL" ) {
} elsif ( $fields[1] eq "F" ) { $wxMGL{$filename} = $fileflags;
$wxMOTIFINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "OS2" ) {
} elsif ( $fields[1] eq "9" ) { $wxOS2PM{$filename} = $fileflags;
$wxMSWINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "HTML" ) {
} elsif ( $fields[1] eq "K" ) { $wxHTML{$filename} = $fileflags;
$wxGTKINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "Unix" ) {
} elsif ( $fields[1] eq "2" ) { $wxUNIX{$filename} = $fileflags;
$wxOS2PMINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "BaseOnly" ) {
} elsif ( $fields[1] eq "S" ) { $wxBase{$filename} = $fileflags;
$wxUNIXINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "WXH" ) {
} elsif ( $fields[1] eq "N" ) { $wxWXINCLUDE{$filename} = $fileflags;
$wxGENERICINCLUDE{$fields[0]} = $fields[2]; } elsif ( $filetype eq "ProtoH" ) {
$wxPROTOCOLINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "HtmlH" ) {
$wxHTMLINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "MotifH" ) {
$wxMOTIFINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "MSWH" ) {
$wxMSWINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "GTKH" ) {
$wxGTKINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "OS2H" ) {
$wxOS2PMINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "UnivH" ) {
$wxUNIVINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "UnixH" ) {
$wxUNIXINCLUDE{$filename} = $fileflags;
} elsif ( $filetype eq "GenericH" ) {
$wxGENERICINCLUDE{$filename} = $fileflags;
} else { } else {
warn "Unknown file type $fields[1] for $fields[0], ignoring.\n"; warn "Unknown file type $filetype for $filename, ignoring.\n";
next line; next line;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,8 @@
#! now transform these hashes into $project tags #! now transform these hashes into $project tags
foreach $file (sort keys %wxGeneric) { foreach $file (sort keys %wxGeneric) {
next if $wxGeneric{$file} =~ /\bU\b/;
my $tag = ""; my $tag = "";
if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) { if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
$tag = "WXNONESSENTIALOBJS"; $tag = "WXNONESSENTIALOBJS";
@@ -36,7 +38,7 @@
next if $wxMSW{$file} =~ /\b16\b/; next if $wxMSW{$file} =~ /\b16\b/;
#! OLE files live in a subdir #! OLE files live in a subdir
$project{"WXMSWOBJS"} .= '..\msw\\'; $project{"WXMSWOBJS"} .= '..\\msw\\';
$project{"WXMSWOBJS"} .= 'ole\\' if $wxMSW{$file} =~ /\bO\b/; $project{"WXMSWOBJS"} .= 'ole\\' if $wxMSW{$file} =~ /\bO\b/;
$file =~ s/cp?p?$/obj/; $file =~ s/cp?p?$/obj/;
$project{"WXMSWOBJS"} .= '$D\\' . $file . " "; $project{"WXMSWOBJS"} .= '$D\\' . $file . " ";