sbsv1/abld/e32util/selectbootmak.pl
changeset 599 fa7a3cc6effd
equal deleted inserted replaced
596:9f25be3da657 599:fa7a3cc6effd
       
     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 File::Copy;
       
    22 
       
    23 my ($dest, $old, $src) = @ARGV;
       
    24 
       
    25 my $oldVersionId = "ARM AOF Macro Assembler vsn 2.37 (Advanced RISC Machines SDT 2.11) [Sep  9 1997]";
       
    26 
       
    27 open ARMASM, "armasm -help|";
       
    28 
       
    29 my $id = <ARMASM>;
       
    30 
       
    31 chop $id;
       
    32 
       
    33 close ARMASM;
       
    34 
       
    35 $src = $old if ($id eq $oldVersionId);
       
    36 
       
    37 unlink $dest;
       
    38 
       
    39 copy("$src", "$dest");
       
    40