1999-07-14 18:46:12 -04:00
|
|
|
#!#############################################################################
|
|
|
|
#! File: filelist.t
|
|
|
|
#! Purpose: tmake template file containig Perl code to parse the filelist.txt
|
|
|
|
#! file - this is used by all other templates.
|
|
|
|
#! Author: Vadim Zeitlin
|
|
|
|
#! Created: 14.07.99
|
|
|
|
#! Version: $Id$
|
|
|
|
#!#############################################################################
|
|
|
|
#${
|
2003-04-17 16:26:52 -04:00
|
|
|
use lib './lib';
|
2003-02-20 13:20:47 -05:00
|
|
|
use wxFileInfo;
|
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
open(FILELIST, "filelist.txt") or die "Can't open filelist file: $!\n";
|
|
|
|
|
2003-02-20 13:20:47 -05:00
|
|
|
#! maps file types to array names, for example an entry of the form
|
|
|
|
#! FooH => 'wxXYZ' means that all files with type "FooH" will be
|
|
|
|
#! added to an array named @wxXYZ
|
|
|
|
my %type_2_array = (
|
|
|
|
Common => "wxCommon",
|
|
|
|
Generic => "wxGeneric",
|
|
|
|
GenericH => "wxGenericInclude",
|
|
|
|
HTML => "wxHtml",
|
|
|
|
HtmlH => "wxHtmlInclude",
|
|
|
|
Motif => "wxMotif",
|
|
|
|
MotifH => "wxMotifInclude",
|
|
|
|
ProtoH => "wxProtocolInclude",
|
|
|
|
Unix => "wxUnix",
|
|
|
|
UnixH => "wxUnixInclude",
|
|
|
|
WXH => "wxWxInclude",
|
|
|
|
);
|
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
line: while ( defined($_ = <FILELIST>) ) {
|
|
|
|
chomp;
|
|
|
|
|
|
|
|
#! comment or blank line, skip
|
|
|
|
next line if ( $_ eq "" or /^#/ );
|
|
|
|
|
|
|
|
#! if ( $verbose ) {
|
2003-01-22 12:04:12 -05:00
|
|
|
#! print STDERR "Processing line: '$_'\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
#! }
|
|
|
|
|
2001-07-04 12:07:51 -04:00
|
|
|
my @fields = split /\t/;
|
|
|
|
|
|
|
|
#! first column is filename, second is type, third is flags
|
|
|
|
my ($filename, $filetype, $fileflags) = @fields;
|
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
if ( $#fields > 2 ) {
|
|
|
|
warn "Ignoring malformed line $_ in the filelist file.\n";
|
|
|
|
next line;
|
|
|
|
} elsif ( $#fields == 1 ) {
|
|
|
|
#! add an empty flags string
|
2001-07-04 12:07:51 -04:00
|
|
|
$fileflags = "";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( $verbose ) {
|
2001-07-04 12:07:51 -04:00
|
|
|
print STDERR "File $filename: type '$filetype', flags '$fileflags'\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
|
2003-02-20 13:20:47 -05:00
|
|
|
#! save all information in @wxALL
|
|
|
|
my $fileinfo = new wxFileInfo( $filename, $filetype, $fileflags );
|
|
|
|
push @wxALL, $fileinfo;
|
|
|
|
|
2001-07-04 12:07:51 -04:00
|
|
|
#! this is a bit stupid but all templates are written using the old
|
|
|
|
#! single letter flags which became so unreadable that I decided to
|
|
|
|
#! replace them with more readable strings, but it was easier to do
|
|
|
|
#! the translation here instead of changing all *.t files
|
|
|
|
$fileflags =~ s/Base/B/;
|
|
|
|
$fileflags =~ s/NotWin32/16/;
|
|
|
|
$fileflags =~ s/Win32Only/32/;
|
|
|
|
$fileflags =~ s/Generic/G/;
|
|
|
|
$fileflags =~ s/OLE/O/;
|
|
|
|
$fileflags =~ s/Socket/S/;
|
|
|
|
$fileflags =~ s/NotMSW/U/;
|
|
|
|
$fileflags =~ s/NotOS2/P/;
|
|
|
|
$fileflags =~ s/LowLevel/L/;
|
2002-06-14 09:03:45 -04:00
|
|
|
$fileflags =~ s/Theme/T/;
|
2001-07-04 12:07:51 -04:00
|
|
|
|
|
|
|
if ( $filetype eq "Common" ) {
|
|
|
|
$wxCommon{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "Generic" ) {
|
|
|
|
$wxGeneric{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "MSW" ) {
|
|
|
|
$wxMSW{$filename} = $fileflags;
|
2001-10-04 17:33:22 -04:00
|
|
|
} elsif ( $filetype eq "Mac" ) {
|
|
|
|
$wxMAC{$filename} = $fileflags;
|
2003-03-21 11:22:40 -05:00
|
|
|
} elsif ( $filetype eq "Cocoa" ) {
|
|
|
|
$wxCOCOA{$filename} = $fileflags;
|
2001-07-04 12:07:51 -04:00
|
|
|
} elsif ( $filetype eq "Motif" ) {
|
|
|
|
$wxMOTIF{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "GTK" ) {
|
|
|
|
$wxGTK{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "Univ" ) {
|
|
|
|
$wxUNIV{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "MGL" ) {
|
|
|
|
$wxMGL{$filename} = $fileflags;
|
2001-12-21 14:22:48 -05:00
|
|
|
} elsif ( $filetype eq "Micro" ) {
|
|
|
|
$wxMICRO{$filename} = $fileflags;
|
2001-07-04 12:07:51 -04:00
|
|
|
} elsif ( $filetype eq "OS2" ) {
|
|
|
|
$wxOS2PM{$filename} = $fileflags;
|
2002-02-07 08:45:14 -05:00
|
|
|
} elsif ( $filetype eq "X11" ) {
|
|
|
|
$wxX11{$filename} = $fileflags;
|
2001-07-04 12:07:51 -04:00
|
|
|
} elsif ( $filetype eq "HTML" ) {
|
|
|
|
$wxHTML{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "Unix" ) {
|
|
|
|
$wxUNIX{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "BaseOnly" ) {
|
|
|
|
$wxBase{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "WXH" ) {
|
|
|
|
$wxWXINCLUDE{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "ProtoH" ) {
|
|
|
|
$wxPROTOCOLINCLUDE{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "HtmlH" ) {
|
|
|
|
$wxHTMLINCLUDE{$filename} = $fileflags;
|
2001-10-04 17:33:22 -04:00
|
|
|
} elsif ( $filetype eq "MacH" ) {
|
|
|
|
$wxMACINCLUDE{$filename} = $fileflags;
|
2003-03-21 11:22:40 -05:00
|
|
|
} elsif ( $filetype eq "CocoaH" ) {
|
|
|
|
$wxCOCOAINCLUDE{$filename} = $fileflags;
|
2001-07-04 12:07:51 -04:00
|
|
|
} elsif ( $filetype eq "MotifH" ) {
|
|
|
|
$wxMOTIFINCLUDE{$filename} = $fileflags;
|
2001-10-24 16:41:34 -04:00
|
|
|
} elsif ( $filetype eq "MSWH" && $fileflags =~ m/O/ ) {
|
|
|
|
$wxOLEINCLUDE{$filename} = $fileflags;
|
2001-07-04 12:07:51 -04:00
|
|
|
} elsif ( $filetype eq "MSWH" ) {
|
|
|
|
$wxMSWINCLUDE{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "GTKH" ) {
|
|
|
|
$wxGTKINCLUDE{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "OS2H" ) {
|
|
|
|
$wxOS2PMINCLUDE{$filename} = $fileflags;
|
2002-12-04 09:11:26 -05:00
|
|
|
} elsif ( $filetype eq "MGLH" ) {
|
|
|
|
$wxMGLINCLUDE{$filename} = $fileflags;
|
2002-02-07 08:45:14 -05:00
|
|
|
} elsif ( $filetype eq "X11H" ) {
|
|
|
|
$wxX11INCLUDE{$filename} = $fileflags;
|
2001-07-04 12:07:51 -04:00
|
|
|
} elsif ( $filetype eq "UnivH" ) {
|
|
|
|
$wxUNIVINCLUDE{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "UnixH" ) {
|
|
|
|
$wxUNIXINCLUDE{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "GenericH" ) {
|
|
|
|
$wxGENERICINCLUDE{$filename} = $fileflags;
|
2001-10-04 17:33:22 -04:00
|
|
|
} elsif ( $filetype eq "MacR" ) {
|
|
|
|
$wxMACRESOURCE{$filename} = $fileflags;
|
2003-03-21 11:22:40 -05:00
|
|
|
} elsif ( $filetype eq "CocoaR" ) {
|
|
|
|
$wxCOCOARESOURCE{$filename} = $fileflags;
|
1999-07-14 18:46:12 -04:00
|
|
|
} else {
|
2001-07-04 12:07:51 -04:00
|
|
|
warn "Unknown file type $filetype for $filename, ignoring.\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
next line;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
close(FILELIST);
|
|
|
|
#$}
|
2003-01-22 12:04:12 -05:00
|
|
|
#! vim:sw=4:ts=4:list:et:ft=perl
|