]>
Commit | Line | Data |
---|---|---|
f2071dda VZ |
1 | #!############################################################################# |
2 | #! File: filelist.t | |
3 | #! Purpose: tmake template file containig Perl code to parse the filelist.txt | |
4 | #! file - this is used by all other templates. | |
5 | #! Author: Vadim Zeitlin | |
6 | #! Created: 14.07.99 | |
7 | #! Version: $Id$ | |
8 | #!############################################################################# | |
9 | #${ | |
10 | open(FILELIST, "filelist.txt") or die "Can't open filelist file: $!\n"; | |
11 | ||
f2071dda VZ |
12 | line: while ( defined($_ = <FILELIST>) ) { |
13 | chomp; | |
14 | ||
15 | #! comment or blank line, skip | |
16 | next line if ( $_ eq "" or /^#/ ); | |
17 | ||
18 | #! if ( $verbose ) { | |
19 | #! print STDERR "Processing line: '$_'\n"; | |
20 | #! } | |
21 | ||
22 | my @fields = split "\t"; | |
23 | if ( $#fields > 2 ) { | |
24 | warn "Ignoring malformed line $_ in the filelist file.\n"; | |
25 | next line; | |
26 | } elsif ( $#fields == 1 ) { | |
27 | #! add an empty flags string | |
28 | $fields[2] = ""; | |
29 | } | |
30 | ||
31 | if ( $verbose ) { | |
32 | print STDERR "File $fields[0]: type '$fields[1]', flags '$fields[2]'\n"; | |
33 | } | |
34 | ||
35 | #! first column is filename, second is type, third is flags | |
36 | if ( $fields[1] eq "C" ) { | |
37 | $wxCommon{$fields[0]} = $fields[2]; | |
38 | } elsif ( $fields[1] eq "G" ) { | |
39 | $wxGeneric{$fields[0]} = $fields[2]; | |
40 | } elsif ( $fields[1] eq "M" ) { | |
41 | $wxMSW{$fields[0]} = $fields[2]; | |
073478b3 RR |
42 | } elsif ( $fields[1] eq "X" ) { |
43 | $wxMOTIF{$fields[0]} = $fields[2]; | |
a3015c54 RR |
44 | } elsif ( $fields[1] eq "R" ) { |
45 | $wxGTK{$fields[0]} = $fields[2]; | |
6c8f8bc5 SN |
46 | } elsif ( $fields[1] eq "O" ) { |
47 | $wxOS2PM{$fields[0]} = $fields[2]; | |
a3015c54 RR |
48 | } elsif ( $fields[1] eq "H" ) { |
49 | $wxHTML{$fields[0]} = $fields[2]; | |
50 | } elsif ( $fields[1] eq "U" ) { | |
51 | $wxUNIX{$fields[0]} = $fields[2]; | |
791a2102 VZ |
52 | } elsif ( $fields[1] eq "B" ) { |
53 | $wxBase{$fields[0]} = $fields[2]; | |
2aa88730 RR |
54 | } elsif ( $fields[1] eq "W" ) { |
55 | $wxWXINCLUDE{$fields[0]} = $fields[2]; | |
56 | } elsif ( $fields[1] eq "P" ) { | |
57 | $wxPROTOCOLINCLUDE{$fields[0]} = $fields[2]; | |
58 | } elsif ( $fields[1] eq "L" ) { | |
59 | $wxHTMLINCLUDE{$fields[0]} = $fields[2]; | |
60 | } elsif ( $fields[1] eq "F" ) { | |
61 | $wxMOTIFINCLUDE{$fields[0]} = $fields[2]; | |
791a2102 | 62 | } elsif ( $fields[1] eq "9" ) { |
a4aad961 | 63 | $wxMSWINCLUDE{$fields[0]} = $fields[2]; |
2aa88730 RR |
64 | } elsif ( $fields[1] eq "K" ) { |
65 | $wxGTKINCLUDE{$fields[0]} = $fields[2]; | |
6c8f8bc5 SN |
66 | } elsif ( $fields[1] eq "2" ) { |
67 | $wxOS2PMINCLUDE{$fields[0]} = $fields[2]; | |
2aa88730 RR |
68 | } elsif ( $fields[1] eq "S" ) { |
69 | $wxUNIXINCLUDE{$fields[0]} = $fields[2]; | |
70 | } elsif ( $fields[1] eq "N" ) { | |
71 | $wxGENERICINCLUDE{$fields[0]} = $fields[2]; | |
f2071dda VZ |
72 | } else { |
73 | warn "Unknown file type $fields[1] for $fields[0], ignoring.\n"; | |
74 | next line; | |
75 | } | |
76 | } | |
77 | ||
78 | close(FILELIST); | |
79 | #$} | |
80 | #! vim:sw=4:ts=4:list:et |