glib/tsrc/genatsmodules.bat
branchRCL_3
changeset 56 acd3cd4aaceb
parent 0 e4d67989cc36
child 57 2efc27d87e1c
equal deleted inserted replaced
54:4332f0f7be53 56:acd3cd4aaceb
     1 @rem
     1 rem
     2 @rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     3 @rem All rights reserved.
     3 rem
     4 @rem This component and the accompanying materials are made available
     4 rem This library is free software; you can redistribute it and/or
     5 @rem under the terms of "Eclipse Public License v1.0"
     5 rem modify it under the terms of the GNU Lesser General Public
     6 @rem which accompanies this distribution, and is available
     6 rem License as published by the Free Software Foundation; either
     7 @rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 rem version 2 of the License, or (at your option) any later version.
     8 @rem
     8 rem
     9 @rem Initial Contributors:
     9 rem This library is distributed in the hope that it will be useful,
    10 @rem Nokia Corporation - initial contribution.
    10 rem but WITHOUT ANY WARRANTY; without even the implied warranty of
    11 @rem
    11 rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12 @rem Contributors:
    12 rem Lesser General Public License for more details.
    13 @rem
    13 rem
    14 @rem Description: 
    14 rem You should have received a copy of the GNU Lesser General Public
    15 @rem
    15 rem License along with this library; if not, write to the
       
    16 rem Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17 rem Boston, MA 02111-1307, USA.
       
    18 rem
       
    19 rem Description:      
       
    20 rem
    16 
    21 
    17 @perl -x GenATSModules.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 
    22 @perl -x GenATSModules.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 
    18 @goto end
    23 @goto end
    19 
    24 
    20 #!perl
    25 #!perl
   101 	session files.
   106 	session files.
   102 EOHelp
   107 EOHelp
   103 		exit();
   108 		exit();
   104 }
   109 }
   105 my $do_armv5 = 1;
   110 my $do_armv5 = 1;
   106 my $do_winscw = 1;
   111 my $do_winscw = 0;
   107 
   112 
   108 if(scalar @ARGV == 1)
   113 if(scalar @ARGV == 1)
   109 {
   114 {
   110 	if($ARGV[0] eq "session")
   115 	if($ARGV[0] eq "session")
   111 	{
   116 	{
   200 	 if(rindex($templateRoot, "stdlibs") != -1)
   205 	 if(rindex($templateRoot, "stdlibs") != -1)
   201 	 {
   206 	 {
   202 	 	$srcPrefix =~ /(.*)stdlibs.*/;
   207 	 	$srcPrefix =~ /(.*)stdlibs.*/;
   203 	 	$srcPrefix = $1;
   208 	 	$srcPrefix = $1;
   204 	 	
   209 	 	
   205 	 	if($suite eq "glib")
   210 	 	if($suite eq "glib-2.20.4")
   206 	 	{
   211 	 	{
   207 	 		$templateRoot = $srcPrefix."/glib/tsrc/";
   212 	 		$templateRoot = $srcPrefix."/glib-2.20.4/";
   208 	 	}
   213 	 	}
   209 	 	elsif($suite eq "ssl")
   214 	 	elsif($suite eq "ssl")
   210 	 	{
   215 	 	{
   211 	 		$templateRoot = $srcPrefix."/ssl/tsrc/";
   216 	 		$templateRoot = $srcPrefix."/ssl/tsrc/";
   212 	 	}
   217 	 	}
   215 	 		print "ngi atsinput creation not supported from mobileruntime\n";
   220 	 		print "ngi atsinput creation not supported from mobileruntime\n";
   216 	 		exit();
   221 	 		exit();
   217 	 	}
   222 	 	}
   218 	 }
   223 	 }
   219 	 
   224 	 
   220 	if(rindex($templateRoot, "glib") != -1)
   225 	if(rindex($templateRoot, "glib-2.20.4") != -1)
   221 	{
   226 	{
   222 		$suite = "glib";
   227 		$suite = "glib-2.20.4";
   223 	}
   228 	}
   224 	elsif(rindex($templateRoot, "ssl") != -1)
   229 	elsif(rindex($templateRoot, "ssl") != -1)
   225 	{
   230 	{
   226 		$suite = "ssl";
   231 		$suite = "ssl";
   227 	}
   232 	}
   309   				 ["ostream_seeks-1.tst","ostream_seeks", "/../internal/testapps/gnu/io/doc/", "/General/", "C:\\TestFramework\\gnu"],
   314   				 ["ostream_seeks-1.tst","ostream_seeks", "/../internal/testapps/gnu/io/doc/", "/General/", "C:\\TestFramework\\gnu"],
   310   				 ["infile_auto.txt","multi_thread_auto", "/../internal/testapps/doc/", "/General/", "C:\\TestFramework\\tstdcpp"],
   315   				 ["infile_auto.txt","multi_thread_auto", "/../internal/testapps/doc/", "/General/", "C:\\TestFramework\\tstdcpp"],
   311 );
   316 );
   312 
   317 
   313 my @gliblist = (
   318 my @gliblist = (
   314   				 ["1.gmarkup", "markup_test", "/epoc32/winscw/c/", "/General/", "C:"],
   319   				 ["valid-1.gmarkup", "markup_test", "/epoc32/winscw/c/", "/General/", "C:"],
   315    				 ["1.gmarkup", "markup-test", "/epoc32/winscw/c/", "/General/", "C:"],
   320 				 ["valid-01.xbel", "bookmarkfile_test", "/epoc32/winscw/c/", "/General/", "C:"],
   316   				 ["iochannel-test-infile", "iochannel_test",  "/epoc32/winscw/c/", "/General/", "C:"],
   321   				 ["iochannel-test-infile", "iochannel_test",  "/epoc32/winscw/c/", "/General/", "C:"],
   317   				 ["iochannel-test-infile", "iochannel-test",  "/epoc32/winscw/c/", "/General/", "C:"],
   322   				 ["casemap.txt",  "unicode_caseconv",  "/epoc32/winscw/c/", "/General/", "C:"],
   318 #  				 ["casemap.bin",  "unicode-caseconv",  "/epoc32/winscw/c/", "/General/", "C:"],
   323   				 ["casefold.txt", "unicode_caseconv",  "/epoc32/winscw/c/", "/General/", "C:"],
   319 #  				 ["casefold.bin", "unicode-caseconv",  "/epoc32/winscw/c/", "/General/", "C:"],
   324   				 ["utf8.txt", "unicode_encoding","/epoc32/winscw/c/", "/General/", "C:"],
   320   				 ["utf8.txt", "unicode-encoding","/epoc32/winscw/c/", "/General/", "C:"],
   325   				 ["collate-1.unicode", "unicode_collate","/epoc32/winscw/c/", "/General/", "C:"],
   321   				 ["casecollate.txt", "unicode-collate","/epoc32/winscw/c/", "/General/", "C:"],
   326   				 ["NormalizationTest.txt", "unicode_normalize","/epoc32/winscw/c/", "/General/", "C:"],
   322   				 ["utf8_hindi.txt", "tutf8","/epoc32/winscw/c/", "/General/", "C:"],
   327   				 ["4096-random-bytes", "strfuncs", "/epoc32/winscw/c/", "/General/", "C:"],
   323   				 ["scanfile.txt", "tscanner","/epoc32/winscw/c/", "/General/", "C:"],
       
   324   				 ["test.txt", "dir_test","/epoc32/winscw/c/temp/tmp/", "/General/", "C:\\temp\\tmp"],
       
   325   				 ["NormalizationTest.txt", "unicode-normalize","/epoc32/winscw/c/", "/General/", "C:"],
       
   326   				 
       
   327   				 ["helloworld.exe", "spawn_test","/epoc32/release/armv5/urel/", "/armv5_urel/", "C:\\sys\\bin"],
   328   				 ["helloworld.exe", "spawn_test","/epoc32/release/armv5/urel/", "/armv5_urel/", "C:\\sys\\bin"],
   328   				 ["helloworld.exe", "spawn_test","/epoc32/release/winscw/udeb/", "/winscw_udeb/", "Z:\\sys\\bin"],
   329   				 ["helloworld.exe", "spawn_test","/epoc32/release/winscw/udeb/", "/winscw_udeb/", "Z:\\sys\\bin"],
   329   				 
   330   				 
   330   				 ["libmoduletestplugin_a.dll", "module-test","/epoc32/release/armv5/urel/", "/armv5_urel/", "C:\\sys\\bin"],
   331   				 ["libmoduletestplugin_a.dll", "module_test","/epoc32/release/armv5/urel/", "/armv5_urel/", "C:\\sys\\bin"],
   331   				 ["libmoduletestplugin_a.dll", "module-test","/epoc32/release/winscw/udeb/", "/winscw_udeb/", "Z:\\sys\\bin"],
   332   				 ["libmoduletestplugin_a.dll", "module_test","/epoc32/release/winscw/udeb/", "/winscw_udeb/", "Z:\\sys\\bin"],
   332   				 
   333   				 
   333   				 ["libmoduletestplugin_b.dll", "module-test","/epoc32/release/armv5/urel/", "/armv5_urel/", "C:\\sys\\bin"],
   334   				 ["libmoduletestplugin_b.dll", "module_test","/epoc32/release/armv5/urel/", "/armv5_urel/", "C:\\sys\\bin"],
   334   				 ["libmoduletestplugin_b.dll", "module-test","/epoc32/release/winscw/udeb/", "/winscw_udeb/", "Z:\\sys\\bin"],
   335   				 ["libmoduletestplugin_b.dll", "module_test","/epoc32/release/winscw/udeb/", "/winscw_udeb/", "Z:\\sys\\bin"],
   335   				 
   336   				 
   336   			  				 
   337   			  				 
   337   				 );
   338   				 );
   338   				 
   339   				 
   339 my @ngilist = (
   340 my @ngilist = (
   354 
   355 
   355   				 
   356   				 
   356 
   357 
   357 
   358 
   358 my $validexpansions = "all stdlibs combined";
   359 my $validexpansions = "all stdlibs combined";
   359 my $validLibraries = "ltp opts lsb glib ssl ngi pcts stdcpp gcce libc-locale play_new";
   360 my $validLibraries = "ltp opts lsb glib-2.20.4 ssl ngi pcts stdcpp gcce libc-locale play_new";
   360 if(rindex($validexpansions, $suite)== -1 && rindex($validLibraries, $suite) == -1)
   361 if(rindex($validexpansions, $suite)== -1 && rindex($validLibraries, $suite) == -1)
   361 {
   362 {
   362 	die("$suite is not a valid library. Valid options are $validexpansions $validLibraries");
   363 	die("$suite is not a valid library. Valid options are $validexpansions $validLibraries");
   363 }
   364 }
   364 
   365 
   460 	
   461 	
   461 	@generatedModules = GetCompiledModules($optsGroupPath."/bld.inf");
   462 	@generatedModules = GetCompiledModules($optsGroupPath."/bld.inf");
   462 	DoGen("opts",".dll");
   463 	DoGen("opts",".dll");
   463 
   464 
   464 }
   465 }
   465 if ($suite eq "glib")
   466 if ($suite eq "glib-2.20.4")
   466 {
   467 {
   467 	my $bldfile = $templateRoot."/glib_nonstif/group/bld.inf";
   468 	my $bldfile = $templateRoot."/group/bld.inf";
       
   469 	my $fileName = $templateRoot;
       
   470 	#chopn("$fileName", 5);
       
   471 	chop($fileName);
       
   472 	chop($fileName);
       
   473 	chop($fileName);
       
   474 	chop($fileName);
       
   475 	chop($fileName);
       
   476 	
       
   477 	$bldfile = $fileName."/build/symbian/tests/group/bld.inf";
       
   478 	print "bldfile: $bldfile\n";	
   468 	my @glibModules = GetCompiledModules($bldfile);
   479 	my @glibModules = GetCompiledModules($bldfile);
       
   480 	#mahesh
       
   481 	print "glibModules: @glibModules\n";
   469 	@generatedModules = @glibModules;
   482 	@generatedModules = @glibModules;
   470 	DoGen("glib",".exe");
   483 	
       
   484 	$bldfile = $fileName."/build/symbian/tests/gobject/group/bld.inf";
       
   485 	print "bldfile: $bldfile\n";	
       
   486 	my @glibModules = GetCompiledModules($bldfile);
       
   487 	#mahesh
       
   488 	print "glibModules: @glibModules\n";
       
   489 	my $i =0;
       
   490 	foreach my $name(@glibModules){
       
   491 		@glibModules[$i] =~ s/ //;
       
   492 		$i = $i + 1;
       
   493 	}
       
   494 	push(@generatedModules, @glibModules);
       
   495 	
       
   496 	$bldfile = $fileName."/build/symbian/tests/refcount/group/bld.inf";
       
   497 	print "bldfile: $bldfile\n";	
       
   498 	my @glibModules = GetCompiledModules($bldfile);
       
   499 	#mahesh
       
   500 	print "glibModules: @glibModules\n";
       
   501 	my $i =0;
       
   502 	foreach my $name(@glibModules){
       
   503 		@glibModules[$i] =~ s/ //;
       
   504 		$i = $i + 1;
       
   505 	}
       
   506 	push(@generatedModules, @glibModules);
       
   507 	
       
   508 	$bldfile = $fileName."/build/symbian/glib/tests/group/bld.inf";
       
   509 	print "bldfile: $bldfile\n";	
       
   510 	my @glibModules = GetCompiledModules($bldfile);
       
   511 	#mahesh
       
   512 	print "glibModules: @glibModules\n";
       
   513 	my $i =0;
       
   514 	foreach my $name(@glibModules){
       
   515 		@glibModules[$i] =~ s/ //;
       
   516 		$i = $i + 1;
       
   517 	}
       
   518 	push(@generatedModules, @glibModules);
       
   519 	
       
   520 	$bldfile = $fileName."/build/symbian/gobject/tests/group/bld.inf";
       
   521 	print "bldfile: $bldfile\n";	
       
   522 	my @glibModules = GetCompiledModules($bldfile);
       
   523 	#mahesh
       
   524 	print "glibModules: @glibModules\n";
       
   525 	my $i =0;
       
   526 	foreach my $name(@glibModules){
       
   527 		@glibModules[$i] =~ s/ //;
       
   528 		$i = $i + 1;
       
   529 	}
       
   530 	
       
   531 	push(@generatedModules, @glibModules);
       
   532 	
       
   533 	DoGen("glib-2.20.4",".exe");
   471 	my $gDataRef = \@gliblist;
   534 	my $gDataRef = \@gliblist;
   472 	CopyArbitDatFiles("glib",$gDataRef);
   535 	CopyArbitDatFiles("glib-2.20.4",$gDataRef);
   473 	
   536 	
   474 	if($install eq "yes")
   537 	if($install eq "yes")
   475 	{
   538 	{
   476 		my @saved = @dllList;
   539 		my @saved = @dllList;
   477 		my @glib2dllList = ("glibbackend.dll", "Libgobject.dll", "libgmodule.dll", "libgthread.dll",
   540 		my @glib2dllList = ("glibbackend.dll", "Libgobject.dll", "libgmodule.dll", "libgthread.dll",
   478                 "libglib.dll");
   541                 "libglib.dll");
   479                 
   542                 
   480    my  @glib1List = ( "libgobject.dll", "libgmodule.dll", "libgthread.dll",  "libglib.dll", );
   543    my  @glib1List = ( "libgobject.dll", "libgmodule.dll", "libgthread.dll",  "libglib.dll", );
   481   @dllList = @glib2dllList;
   544   @dllList = @glib2dllList;
   482   CopySharedDlls("glib",\@dllList);     	
   545   CopySharedDlls("glib-2.20.4",\@dllList);     	
   483   TransformXmls("glib", "shared");
   546   TransformXmls("glib-2.20.4", "shared");
   484    	
   547    	
   485 		@dllList = @saved;
   548 		@dllList = @saved;
   486 	}#if install
   549 	}#if install
   487 }#glib
   550 }#glib-2.20.4
   488 
   551 
   489 
   552 
   490 if ($suite eq "ssl")
   553 if ($suite eq "ssl")
   491 {
   554 {
   492 	my $stripStatus = $dontStrip;
   555 	my $stripStatus = $dontStrip;
  1029 	#copy the provided cfg, ini and xmls
  1092 	#copy the provided cfg, ini and xmls
  1030 	if($libname eq "opts")
  1093 	if($libname eq "opts")
  1031 	{
  1094 	{
  1032 		CopyOptsCfg($libname);
  1095 		CopyOptsCfg($libname);
  1033 	}
  1096 	}
  1034 	elsif($libname eq "ltp" || $libname eq "lsb" || $libname eq "glib")
  1097 	elsif($libname eq "ltp" || $libname eq "lsb" || $libname eq "glib-2.20.4")
  1035 	{
  1098 	{
  1036 	  #copy latter and  dont copy respectively for ltp and lsb
  1099 	  #copy latter and  dont copy respectively for ltp and lsb
  1037 	}
  1100 	}
  1038 	else
  1101 	else
  1039 	{
  1102 	{
  1713   		}
  1776   		}
  1714   }#ref processing
  1777   }#ref processing
  1715 }#fn
  1778 }#fn
  1716 
  1779 
  1717 
  1780 
  1718 #glib dat file copy
  1781 #glib-2.20.4 dat file copy
  1719 sub CopyArbitDatFiles($$)
  1782 sub CopyArbitDatFiles($$)
  1720 {
  1783 {
  1721 	
  1784 	
  1722 	 my $libname = shift @_;
  1785 	 my $libname = shift @_;
  1723 	 my $refArr = shift @_;
  1786 	 my $refArr = shift @_;
  1757   		{
  1820   		{
  1758   			die("DIED: no Dat file  $src found to copy!");
  1821   			die("DIED: no Dat file  $src found to copy!");
  1759   		}
  1822   		}
  1760   		foreach my $file(@filesFound)
  1823   		foreach my $file(@filesFound)
  1761   		{
  1824   		{
  1762   			copy($file, $dst) || die("DIED: unable to copy $file to $dst");
  1825   			copy($file, $dst) || warn("DIED: unable to copy $file to $dst");
  1763   		}
  1826   		}
  1764   		
  1827   		
  1765   		if($targetDst ne "")
  1828   		if($targetDst ne "")
  1766   		{
  1829   		{
  1767   			 		my @filesToChange = ();
  1830   			 		my @filesToChange = ();