sbsv1/abld/e32util/gendef.pl
changeset 607 378360dbbdba
parent 606 30b30f9da0b7
equal deleted inserted replaced
591:22486c9c7b15 607:378360dbbdba
       
     1 #!/usr/bin/perl
       
     2 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 # e32toolp/e32util/gendef.pl
       
    16 # 
       
    17 #
       
    18 
       
    19 use FindBin;		# for FindBin::Bin
       
    20 
       
    21 my $PerlLibPath;    # fully qualified pathname of the directory containing our Perl modules
       
    22 
       
    23 BEGIN {
       
    24 # check user has a version of perl that will cope
       
    25 	require 5.005_03;
       
    26 }
       
    27 
       
    28 # Version
       
    29 my $MajorVersion = 1;
       
    30 my $MinorVersion = 1;
       
    31 my $PatchVersion = 0;
       
    32 
       
    33 
       
    34 # THE MAIN PROGRAM SECTION
       
    35 ##########################
       
    36 
       
    37 unless (@ARGV>1)
       
    38 {
       
    39 	&Usage;
       
    40 }
       
    41 my @exports = @ARGV;
       
    42 my $outfile = shift @exports;
       
    43 
       
    44 open OUTFILE, ">$outfile" or die "Gendef.pl: Unable to open $outfile for writing";
       
    45 
       
    46 print OUTFILE "EXPORTS\n";
       
    47 my $exportNum = 1;
       
    48 foreach (@exports)
       
    49 {
       
    50 	print OUTFILE "\t$_ @ $exportNum NONAME\n";
       
    51 	++$exportNum;
       
    52 }
       
    53 
       
    54 close OUTFILE;
       
    55 
       
    56 #######################################################################
       
    57 # SUBROUTINES
       
    58 #######################################################################
       
    59 
       
    60 sub Usage () {
       
    61 
       
    62 	print(
       
    63 		"\n",
       
    64 		"GENDEF - Generate a DEF file from passed exports V$MajorVersion.$MinorVersion.$PatchVersion\n",
       
    65 		"\n",
       
    66 		"GENDEF.PL [output def file] [1st export name] ([Other export names]...)\n",
       
    67 		"\n",
       
    68 		"\n",
       
    69 		"\n"
       
    70 	);
       
    71 	exit 1;
       
    72 }
       
    73 
       
    74