Fix setupprj.bat to cope with missing Docs directory, and to export .xml amd flm files from buildsystem - fixes Bug 2539
--- a/sbsv1_os/e32toolp/group/setupprj.bat Fri Apr 16 16:10:01 2010 +0300
+++ b/sbsv1_os/e32toolp/group/setupprj.bat Tue Apr 20 12:51:24 2010 +0100
@@ -117,18 +117,21 @@
closedir CONFIGDIR;
-opendir SUBDIR, "..\\Docs" or die "ERROR: Can't open dir \"..\\Docs\"\n";
-my @Docs = map lc $_, readdir SUBDIR;
-@Docs = grep /^[^\.].+\.(rtf|doc|changes|txt|html|htm)$/o, @Docs;
+my @Docs;
+if (-d "..\\Docs") {
+ opendir SUBDIR, "..\\Docs" or die "ERROR: Can't open dir \"..\\Docs\"\n";
+ @Docs = map lc $_, readdir SUBDIR;
+ @Docs = grep /^[^\.].+\.(rtf|doc|changes|txt|html|htm)$/o, @Docs;
+ closedir SUBDIR;
+}
-closedir SUBDIR;
open TEMPLATEFILESUBDIR, "\"dir \/s \/b \/a-d ..\\..\\..\\toolsandutils\\buildsystem\\extension\" |";
my @TemplateFiles=();
my %TemplateDirs;
while (<TEMPLATEFILESUBDIR>)
{
- next if ($_ !~ /\.(mk|meta)$/i);
+ next if ($_ !~ /\.(mk|meta|flm|xml)$/i);
$_ =~ s/^.*\\buildsystem\\extension\\//i;
chomp $_;
push @TemplateFiles, $_;
@@ -241,6 +244,16 @@
);
}
+if (scalar @Docs) {
+ &Output(
+ "$DocsPath :\n",
+ "\t\@perl -w ..\\genutil\\emkdir.pl $DocsPath\n",
+ "\n"
+ );
+} else {
+ $DocsPath = ""; # suppresses $DocsPath as a dependency in the main rules
+}
+
&Output(
"$ShellFilePath :\n",
"\t\@perl -w ..\\genutil\\emkdir.pl $ShellFilePath\n",
@@ -248,9 +261,6 @@
"$EPOCToolsConfigFilePath :\n",
"\t\@perl -w ..\\genutil\\emkdir.pl $EPOCToolsConfigFilePath\n",
"\n",
- "$DocsPath :\n",
- "\t\@perl -w ..\\genutil\\emkdir.pl $DocsPath\n",
- "\n",
"\n",
"deb : $EPOCToolsPath $EPOCToolsConfigFilePath $DocsPath $TemplateFilePath $ShellFilePath "
);