--- a/cross-plat-dev-utils/fix_epoc32_linux.pl Thu May 13 19:18:16 2010 +0100
+++ b/cross-plat-dev-utils/fix_epoc32_linux.pl Sat May 15 14:32:45 2010 +0100
@@ -28,26 +28,25 @@
my $wrong_product_variant_hrh = File::Spec->catfile(get_epoc32_dir(),"include","ProductVariant.hrh");
my $right_product_variant_hrh = File::Spec->catfile(get_epoc32_dir(),"include","productvariant.hrh");
if (! -f $right_product_variant_hrh and ! -l $right_product_variant_hrh) {
- print ">>> Creating symlink \"$wrong_product_variant_hrh\" -> \"$right_product_variant_hrh\"\n";
+ symlink($wrong_product_variant_hrh,$right_product_variant_hrh) or die $!;
+ print ">>> Created symlink \"$wrong_product_variant_hrh\" -> \"$right_product_variant_hrh\"\n";
print ">>> (workaround for bug #1399)\n";
- symlink($wrong_product_variant_hrh,$right_product_variant_hrh) or die $!;
}
my $gcc_include_dir = File::Spec->catfile(get_epoc32_dir(),"include","gcc");
if (! -d $gcc_include_dir) {
- print ">>> Creating \"$gcc_include_dir\"\n";
mkdir $gcc_include_dir or die $!;
+ print ">>> Created \"$gcc_include_dir\"\n";
}
my $gcc_441_prelinclude_hdr_rel = File::Spec->catfile("epoc32","include","gcc","gcc_4_4_1.h");
my $gcc_441_prelinclude_hdr_abs = File::Spec->catfile("$epocroot","$gcc_441_prelinclude_hdr_rel");
my $gcc_prelinclude_hdr = File::Spec->catfile("$epocroot","epoc32","include","gcc","gcc.h");
-if (! -f $gcc_441_prelinclude_hdr_abs) {
- print ">>> Creating \"$gcc_441_prelinclude_hdr_abs\"\n";
- apply_patch_file($gcc_441_prelinclude_hdr_rel);
+if (apply_patch_file($gcc_441_prelinclude_hdr_rel)) {
+ print ">>> Created \"$gcc_441_prelinclude_hdr_abs\"\n";
unlink($gcc_prelinclude_hdr)
}
if (! -l $gcc_prelinclude_hdr) {
- print ">>> Creating symlink \"$gcc_441_prelinclude_hdr_abs\" -> \"$gcc_prelinclude_hdr\"\n";
symlink($gcc_441_prelinclude_hdr_abs,$gcc_prelinclude_hdr);
+ print ">>> Created symlink \"$gcc_441_prelinclude_hdr_abs\" -> \"$gcc_prelinclude_hdr\"\n";
}
exit 0;