cross-plat-dev-utils/set_epocroot.pm
changeset 6 787612182dd0
parent 5 301c3edbdaa1
child 7 0232de5196ec
equal deleted inserted replaced
5:301c3edbdaa1 6:787612182dd0
     1 #!/usr/bin/perl
       
     2 # Copyright (c) 2010 Symbian Foundation Ltd
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "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 # Mike Kinghan, mikek@symbian.org, for Symbian Foundation Ltd - initial contribution.
       
    10 
       
    11 # Routine to set EPOCROOT if not defined; is set to fully qualified name of ../..
       
    12 
       
    13 use strict;
       
    14 use Cwd;
       
    15 sub set_epocroot()
       
    16 {
       
    17     if (!$ENV{'EPOCROOT'}) {
       
    18         print ">>> EPOCROOT not defined. Assuming ../..\n";
       
    19         my $cwd = getcwd;
       
    20         chdir "../..";
       
    21     	print ">>> EPOCROOT=",getcwd,"\n";
       
    22     	$ENV{'EPOCROOT'}=getcwd;
       
    23     	chdir $cwd;
       
    24     }
       
    25 }
       
    26 
       
    27 1;
       
    28