1) Add imgtools/romtools to the targets for which exports are performed by fix_tools_exports.pl
2) Windows compatibility fix to list_targets.pl
3) Modify imgtools\romtools\group\BLD.INF so that Windows-only exports are not performed on Linux hosts or vice versa.
4) Windows compatibility fix for imgtools\romtools\rombuild\romnibus.pl
--- a/cross-plat-dev-utils/fix_tool_exports.pl Thu Nov 25 13:59:07 2010 +0000
+++ b/cross-plat-dev-utils/fix_tool_exports.pl Sat Nov 27 17:23:11 2010 +0000
@@ -14,12 +14,20 @@
use perl_run;
use places;
use check_os;
+use File::Spec;
my $keepgoing = 0;
my @exported = ();
my @failed = ();
-my @skipped = ();
# These are the targets that need exports performed.
-my @needed_exports = ("sbsv1/abld","sbsv1/buildsystem");
+my @needed_exports = (File::Spec->catfile("sbsv1","abld"),
+ File::Spec->catfile("sbsv1","buildsystem"),
+ File::Spec->catfile("imgtools","romtools"));
+
+if (os_is_windows()) {
+ foreach (@needed_exports) {
+ s/\\/\//g;
+ }
+}
sub export($)
{
@@ -83,29 +91,14 @@
}
foreach my $line (@targ_lines) {
chomp $line;
- next, unless ($line =~ /^sbsv1/);
- next, unless (grep(/$line/,@needed_exports));
- next, if ($line =~ /^>>>/);
- if ($line =~ /(\*\*\*.*\*\*\*)/) {
- my $reason = $1;
- my @words = split(/ /,$line);
- print ">>> Skipping target $words[0]: \"$reason\"\n";
- push (@skipped,[$words[0],$reason]);
- } else {
- foreach my $dep (@deps) {
- my ($targ,$prereq) = split(/ /,$dep);
- if (os_is_windows()) {
- $targ =~ s/\./\\/g;
- $prereq =~ s/\./\\/g;
- } else {
- $targ =~ s/\./\//g;
- $prereq =~ s/\./\//g;
- }
- next, unless ($targ eq $line);
- export($prereq);
- }
- export($line);
- }
+ my $re_line = $line;
+ if (os_is_windows()) {
+ $re_line =~ s/\\/\//g;
+ }
+ next, if ($line =~ /(\*\*\*.*\*\*\*)/);
+ next, if ($line =~ /^>>>/);
+ next, unless (grep(/^$re_line$/,(@needed_exports)));
+ export($line);
}
if (@exported) {
if (@failed == 0) {
@@ -123,11 +116,5 @@
print "+++ $targ\n";
}
}
-if (@skipped) {
- print ">>> Skipped targets:-\n";
- foreach my $skipped (@skipped) {
- print "+++ " . $skipped->[0] . ' ' . $skipped->[1] . "\n";
- }
-}
exit 0;
--- a/cross-plat-dev-utils/list_targets.pl Thu Nov 25 13:59:07 2010 +0000
+++ b/cross-plat-dev-utils/list_targets.pl Sat Nov 27 17:23:11 2010 +0000
@@ -14,6 +14,7 @@
use strict;
use places;
use usage;
+use check_os;
use File::Spec;
sub list_targets($);
@@ -24,6 +25,7 @@
my $epocroot = get_epocroot();
my $build_pkg_dir = get_pkg_dir();
my $build_pkg_dir_parts = File::Spec->splitdir($build_pkg_dir);
+--$build_pkg_dir_parts, if (os_is_windows()); # Discount drive letter on Windows.
list_targets($build_pkg_dir);
exit 0;
--- a/imgtools/romtools/group/BLD.INF Thu Nov 25 13:59:07 2010 +0000
+++ b/imgtools/romtools/group/BLD.INF Sat Nov 27 17:23:11 2010 +0000
@@ -22,10 +22,12 @@
PRJ_EXPORTS
+#ifndef TOOLS2_LINUX
../maksym/fixupsym.bat EPOCROOT_EXPORT_PATH(epoc32/tools/fixupsym.bat)
../maksym/hpsym.bat /epoc32/tools/hpsym.bat
../maksym/maksym.bat /epoc32/tools/maksym.bat
../maksym/maksymrofs.bat /epoc32/tools/maksymrofs.bat
+#endif
../maksym/fixupsym.pl /epoc32/tools/fixupsym.pl
../maksym/hpsym.pl /epoc32/tools/hpsym.pl
../maksym/maksym.pl /epoc32/tools/maksym.pl
@@ -34,11 +36,13 @@
../rombuild/checkstubs.pl /epoc32/rom/tools/checkstubs.pl
../rombuild/addextension.pl /epoc32/rom/tools/addextension.pl
../rombuild/romnibus.pl /epoc32/rom/tools/romnibus.pl
+#ifdef TOOLS2_LINUX
../rombuild/Armutl.pm /epoc32/tools/Armutl.pm
../rombuild/BPABIutl.pm /epoc32/tools/BPABIutl.pm
../rombuild/E32Plat.pm /epoc32/tools/E32Plat.pm
../rombuild/E32Variant.pm /epoc32/tools/E32Variant.pm
../rombuild/GCCEV5.bsf /epoc32/tools/GCCEV5.bsf
+#endif
PRJ_MMPFILES
readimage
--- a/imgtools/romtools/rombuild/romnibus.pl Thu Nov 25 13:59:07 2010 +0000
+++ b/imgtools/romtools/rombuild/romnibus.pl Sat Nov 27 17:23:11 2010 +0000
@@ -564,7 +564,7 @@
print "\"rename rom.oby -> $obyname\" failed: $!\n";
exit 1;
}
- if (system("$maksym $logname")) {
+ if (system("perl $maksym $logname")) {
print "\"maksym.pl $logname\" failed: $!\n";
exit 1;
}
@@ -628,8 +628,11 @@
my ($in, $out, $k) = @_;
my $lastblank;
my $lineno = 0;
- my $epocroot_pattern = $on_windows ? $epocroot . '\\\\' : $epocroot;
-
+ my $epocroot_pattern = $epocroot;
+ if ($on_windows) {
+ $epocroot_pattern .= '\\';
+ $epocroot_pattern = ~ s/\\/\\\\/g;
+ }
open(OUTPUT_FILE, "> $out") or die "Cannot open $out for output";
open(INPUT_FILE, "< $in") or die "Cannot open for $in input";