115 opendir CONFIGDIR, "..\\platform" or die "ERROR: Can't open dir \"..\\platform\"\n"; |
115 opendir CONFIGDIR, "..\\platform" or die "ERROR: Can't open dir \"..\\platform\"\n"; |
116 @ConfigFiles = grep /\.(mk|make)/i, readdir CONFIGDIR; |
116 @ConfigFiles = grep /\.(mk|make)/i, readdir CONFIGDIR; |
117 |
117 |
118 closedir CONFIGDIR; |
118 closedir CONFIGDIR; |
119 |
119 |
120 opendir SUBDIR, "..\\Docs" or die "ERROR: Can't open dir \"..\\Docs\"\n"; |
120 my @Docs; |
121 my @Docs = map lc $_, readdir SUBDIR; |
121 if (-d "..\\Docs") { |
122 @Docs = grep /^[^\.].+\.(rtf|doc|changes|txt|html|htm)$/o, @Docs; |
122 opendir SUBDIR, "..\\Docs" or die "ERROR: Can't open dir \"..\\Docs\"\n"; |
|
123 @Docs = map lc $_, readdir SUBDIR; |
|
124 @Docs = grep /^[^\.].+\.(rtf|doc|changes|txt|html|htm)$/o, @Docs; |
|
125 closedir SUBDIR; |
|
126 } |
123 |
127 |
124 closedir SUBDIR; |
|
125 |
128 |
126 open TEMPLATEFILESUBDIR, "\"dir \/s \/b \/a-d ..\\..\\..\\toolsandutils\\buildsystem\\extension\" |"; |
129 open TEMPLATEFILESUBDIR, "\"dir \/s \/b \/a-d ..\\..\\..\\toolsandutils\\buildsystem\\extension\" |"; |
127 my @TemplateFiles=(); |
130 my @TemplateFiles=(); |
128 my %TemplateDirs; |
131 my %TemplateDirs; |
129 while (<TEMPLATEFILESUBDIR>) |
132 while (<TEMPLATEFILESUBDIR>) |
130 { |
133 { |
131 next if ($_ !~ /\.(mk|meta)$/i); |
134 next if ($_ !~ /\.(mk|meta|flm|xml)$/i); |
132 $_ =~ s/^.*\\buildsystem\\extension\\//i; |
135 $_ =~ s/^.*\\buildsystem\\extension\\//i; |
133 chomp $_; |
136 chomp $_; |
134 push @TemplateFiles, $_; |
137 push @TemplateFiles, $_; |
135 $_ =~ /^(.*\\)/o; |
138 $_ =~ /^(.*\\)/o; |
136 my $path = $1; |
139 my $path = $1; |
239 "\t\@perl -w ..\\genutil\\emkdir.pl $BinFilePath\\$_\n", |
242 "\t\@perl -w ..\\genutil\\emkdir.pl $BinFilePath\\$_\n", |
240 "\n" |
243 "\n" |
241 ); |
244 ); |
242 } |
245 } |
243 |
246 |
|
247 if (scalar @Docs) { |
|
248 &Output( |
|
249 "$DocsPath :\n", |
|
250 "\t\@perl -w ..\\genutil\\emkdir.pl $DocsPath\n", |
|
251 "\n" |
|
252 ); |
|
253 } else { |
|
254 $DocsPath = ""; # suppresses $DocsPath as a dependency in the main rules |
|
255 } |
|
256 |
244 &Output( |
257 &Output( |
245 "$ShellFilePath :\n", |
258 "$ShellFilePath :\n", |
246 "\t\@perl -w ..\\genutil\\emkdir.pl $ShellFilePath\n", |
259 "\t\@perl -w ..\\genutil\\emkdir.pl $ShellFilePath\n", |
247 "\n", |
260 "\n", |
248 "$EPOCToolsConfigFilePath :\n", |
261 "$EPOCToolsConfigFilePath :\n", |
249 "\t\@perl -w ..\\genutil\\emkdir.pl $EPOCToolsConfigFilePath\n", |
262 "\t\@perl -w ..\\genutil\\emkdir.pl $EPOCToolsConfigFilePath\n", |
250 "\n", |
|
251 "$DocsPath :\n", |
|
252 "\t\@perl -w ..\\genutil\\emkdir.pl $DocsPath\n", |
|
253 "\n", |
263 "\n", |
254 "\n", |
264 "\n", |
255 "deb : $EPOCToolsPath $EPOCToolsConfigFilePath $DocsPath $TemplateFilePath $ShellFilePath " |
265 "deb : $EPOCToolsPath $EPOCToolsConfigFilePath $DocsPath $TemplateFilePath $ShellFilePath " |
256 ); |
266 ); |
257 |
267 |