sbsv1_os/e32toolp/e32util/selectbootmak.pl
changeset 0 83f4b4db085c
child 1 d4b442d23379
equal deleted inserted replaced
-1:000000000000 0:83f4b4db085c
       
     1 # Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 # Used to select a makefile which matches the installed version of armasm
       
    15 # check to see which version of armasm we've got (first on PATH).
       
    16 # if its the old one then copy the file specified by $old to $dest
       
    17 # else copy $src to $dest
       
    18 # 
       
    19 #
       
    20 
       
    21 use strict;
       
    22 use File::Copy;
       
    23 
       
    24 my ($dest, $old, $src) = @ARGV;
       
    25 
       
    26 my $oldVersionId = "ARM AOF Macro Assembler vsn 2.37 (Advanced RISC Machines SDT 2.11) [Sep  9 1997]";
       
    27 
       
    28 open ARMASM, "armasm -help|";
       
    29 
       
    30 my $id = <ARMASM>;
       
    31 
       
    32 chop $id;
       
    33 
       
    34 close ARMASM;
       
    35 
       
    36 $src = $old if ($id eq $oldVersionId);
       
    37 
       
    38 unlink $dest;
       
    39 
       
    40 copy("$src", "$dest");
       
    41