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$
|
|
|
|
#!#############################################################################
|
|
|
|
#${
|
|
|
|
open(FILELIST, "filelist.txt") or die "Can't open filelist file: $!\n";
|
|
|
|
|
|
|
|
line: while ( defined($_ = <FILELIST>) ) {
|
|
|
|
chomp;
|
|
|
|
|
|
|
|
#! comment or blank line, skip
|
|
|
|
next line if ( $_ eq "" or /^#/ );
|
|
|
|
|
|
|
|
#! if ( $verbose ) {
|
|
|
|
#! print STDERR "Processing line: '$_'\n";
|
|
|
|
#! }
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
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/NotGTK/R/;
|
|
|
|
$fileflags =~ s/NotX/X/;
|
|
|
|
$fileflags =~ s/NotOS2/P/;
|
|
|
|
$fileflags =~ s/LowLevel/L/;
|
|
|
|
|
|
|
|
if ( $filetype eq "Common" ) {
|
|
|
|
$wxCommon{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "Generic" ) {
|
|
|
|
$wxGeneric{$filename} = $fileflags;
|
|
|
|
} elsif ( $filetype eq "MSW" ) {
|
|
|
|
$wxMSW{$filename} = $fileflags;
|
|
|
|
} 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;
|
|
|
|
} elsif ( $filetype eq "OS2" ) {
|
|
|
|
$wxOS2PM{$filename} = $fileflags;
|
|
|
|
} 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;
|
|
|
|
} 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;
|
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);
|
|
|
|
#$}
|
|
|
|
#! vim:sw=4:ts=4:list:et
|