sdkcreationmw/sdkexamples/cppexamples/build/buildS60ex.pl
author rajpuroh
Mon, 08 Mar 2010 12:09:11 +0530
changeset 0 b26acd06ea60
permissions -rw-r--r--
First Contribution of SDK components
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
# All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
# This component and the accompanying materials are made available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     5
# under the terms of "Eclipse Public License v1.0"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
# which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
# Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
# Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    14
# Description: 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
#################################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
# Nokia/NMP/TWS S60 SDK TF
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
# Series 60 & Series 90 SDK example apps builder
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
# 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
# [TBD]
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
# Mike Smyslov
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
# 15.07.2003
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
  $version = "buildS60ex.pl v0.22";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
# CHANGES
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
# 0.21 -> 0.22: Smart handling of creating .sis files for ARMV5 and GCCE targets:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
#               .sis file is created from the .pkg file corresponding to target,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
#               both UREL armv5 and gcce are assumed; .pkg file is either
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
#               <appname>_armv5.pkg or <appname>_gcce.pkg
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
#               
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
# 0.20 -> 0.21: GCCE udeb / urel made valid targets
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
# 0.19 -> 0.20: .sis creation removed for armv5_udeb target		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
# 0.18 -> 0.19: Separate targets armv5_udeb & armv5_urel;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
#		separate targets winscw_udeb & wincw urel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
# 0.17 -> 0.18: More correct parsing of example apps grouped in subdirs (openglex).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
# 0.16 -> 0.17: Target "armv5" added".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
#################################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
# we will measure walking time in seconds
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
$starttime = (time); 			
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
# current time and date
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
chomp($time = `time /T`);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
chomp($date = `date /T`);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
# Target token to control build process' target
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
$target = $ARGV[0] || die "\nError!\nUsage: build.pl target sdk_location\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
chomp($target);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
$target =~ tr/A-Z/a-z/;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
# targets: wins, winscw, armv5, gcce, thumb, clean, reallyclean
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
if ( ($target ne "wins") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
     ($target ne "winscw_urel") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
     ($target ne "winscw_udeb") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
     ($target ne "thumb") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
     ($target ne "armv5_udeb") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
     ($target ne "armv5_urel") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
     ($target ne "gcce_udeb") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
     ($target ne "gcce_urel") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
     ($target ne "clean") && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
     ($target ne "reallyclean") )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    77
	print "\nError!\nTarget wins|winscw_urel|winscw_udeb|thumb|armv5_urel|armv5_udeb|gcce_urel|gcce_udeb|clean|reallyclean\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    78
	exit;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    79
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    80
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    81
$path = $ARGV[1] || die "\nError!\nUsage: build.pl target [SDK location]\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    82
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    83
# LOGFILE
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    84
$curd = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    85
chomp($curd);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    86
$log = $curd."\\build_S60ex_".$target."_.txt";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    87
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    88
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    89
# write script's starting information to logfile and console
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    90
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    91
print "\nStarting to build SDK example apps ($target)\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    92
open( LOG, ">$log") || die "Cannot open file $log!";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    93
print LOG "Starting to build SDK example apps ($target).\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    94
print LOG "Path to example apps: $path\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    95
print "Path to example apps: $path\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    96
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    97
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    98
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    99
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   100
# try to follow the path to example applications
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   101
$dir_exist = chdir $path;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   102
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   103
if (not $dir_exist)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   104
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   105
	print "Error: could not enter target path!\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   106
	print LOG "\nError: could not enter target path!\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   107
	close LOG;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   108
	exit;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   109
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   110
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   111
# find all applications
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   112
@apps = `dir /S /B bld.inf`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   113
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   114
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   115
# the number of found applications
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   116
$appCount = @apps;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   117
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   118
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   119
# write the number of found applications to logfile and console
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   120
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   121
if ($appCount eq 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   122
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   123
	print "Error: could not find Series 60 example applications!\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   124
	print LOG "\nError: could not find Series 60 example applications!";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   125
	close LOG;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   126
	exit;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   127
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   128
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   129
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   130
print "Build started: $date $time\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   131
print LOG "Build started: $date $time\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   132
print "$appCount applications found.\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   133
print LOG "$appCount applications found.\n\n\n\n\n\n\n\n\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   134
close LOG;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   135
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   136
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   137
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   138
# set default target device prior to building 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   139
# NOTE: this has been dropped since SDK builds 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   140
# suppose to carry variable device mappings
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   141
#system("devices -setdefault \@Series60_v20:com.nokia.series60");
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   142
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   143
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   144
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   145
while( @apps )	# build all found applications
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   146
{ 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   147
	chomp($app = shift @apps);			# parse application name from path
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   148
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   149
							# debug # print "\napp=$app\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   150
	$app =~ /(.*)\\bld\.inf$/i;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   151
	$appPath = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   152
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   153
	$appPathLC = $appPath;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   154
	$appPathLC =~ tr/A-Z/a-z/;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   155
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   156
	next if ($appPathLC =~ m /tsrc/);		# skip /tsrc/ dirs from handling
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   157
							# debug # print "appPath = $appPath\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   158
	$shortpath = $appPath;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   159
	$shortpath =~ s/\Q$path//;			# remove common dir prefix from $path
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   160
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   161
							# debug# print "\nshortpath = $shortpath\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   162
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   163
	$shortpath =~/\\(.*)/;				# remove leading "\"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   164
	$shortpath = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   165
	$shortpath =~/(.*)(\\group)/i;			# remove trailing "\group"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   166
	$appName = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   167
							# debug # print "\nappName = $appName\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   168
	# build application
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   169
	build($appPath, $appName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   170
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   171
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   172
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   173
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   174
# walking time calculation in seconds
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   175
$endtime = (time);			
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   176
$runtime = $endtime - $starttime;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   177
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   178
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   179
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   180
# write ending information of building process to logfile and console
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   181
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   182
chomp($time = `time /T`);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   183
chomp($date = `date /T`);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   184
open( LOG, ">>$log") || die "Cannot open file $log!";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   185
print LOG '_' x 80;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   186
print LOG "\nBuild ended: $date $time ($runtime seconds spent)\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   187
print "\nBuild ended: $date $time ($runtime seconds spent)\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   188
close LOG;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   189
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   190
exit;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   191
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   192
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   193
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   194
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   195
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   196
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   197
# Subroutine for build commands
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   198
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   199
sub build($appPath, $appName)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   200
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   201
	# change dir
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   202
	chdir $appPath;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   203
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   204
	print "$appName";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   205
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   206
	# write error messages to logfile 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   207
	open( STDERR, ">>$log") || die "Cannot open file $log!";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   208
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   209
	$heading = $appName."       (".$appPath.")";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   210
	$spc_count = length($heading);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   211
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   212
	print STDERR '-' x $spc_count . "\n";	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   213
	print STDERR $heading."\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   214
	print STDERR '-' x $spc_count . "\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   215
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   216
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   217
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   218
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   219
	if ( ($target ne "clean") && ($target ne "reallyclean") )  # makefiles needs to be generated
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   220
	{							   # only for build process, not for cleaning
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   221
	# generate makefiles and abld.bat from bld.inf
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   222
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   223
	print STDERR "---> bldmake -v bldfiles:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   224
	$res = `bldmake -v bldfiles`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   225
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   226
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   227
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   228
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   229
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   230
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   231
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   232
	if ($target eq "winscw_urel")						     # WINSCW
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   233
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   234
	# build winscw
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   235
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   236
	print STDERR "---> abld build winscw urel (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   237
	$res = `abld build winscw urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   238
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   239
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   240
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   241
	# freeze exports winscw
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   242
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   243
	print STDERR "---> abld freeze winscw:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   244
	$res = `abld freeze winscw`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   245
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   246
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   247
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   248
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   249
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   250
	print STDERR "---> abld build winscw urel (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   251
	$res = `abld build winscw urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   252
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   253
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   254
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   255
	# generate Codewarrior IDE project file
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   256
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   257
	print STDERR "---> abld makefile cw_ide:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   258
	$res = `abld makefile cw_ide`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   259
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   260
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   261
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   262
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   263
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   264
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   265
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   266
	if ($target eq "winscw_udeb")						     # WINSCW only UREL branch for S90 SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   267
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   268
	# build winscw
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   269
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   270
	print STDERR "---> abld build winscw udeb (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   271
	$res = `abld build winscw udeb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   272
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   273
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   274
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   275
	# freeze exports winscw
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   276
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   277
	print STDERR "---> abld freeze winscw:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   278
	$res = `abld freeze winscw`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   279
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   280
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   281
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   282
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   283
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   284
	print STDERR "---> abld build winscw udeb (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   285
	$res = `abld build winscw udeb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   286
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   287
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   288
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   289
	# generate Codewarrior IDE project file
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   290
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   291
	print STDERR "---> abld makefile cw_ide:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   292
	$res = `abld makefile cw_ide`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   293
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   294
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   295
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   296
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   297
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   298
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   299
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   300
	if ($target eq "wins")						     	     # WINS
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   301
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   302
	# build wins
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   303
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   304
	print STDERR "---> abld build wins (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   305
	$res = `abld build wins`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   306
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   307
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   308
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   309
	# freeze exports wins
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   310
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   311
	print STDERR "---> abld freeze wins:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   312
	$res = `abld freeze wins`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   313
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   314
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   315
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   316
	# build app after freeze wins
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   317
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   318
	print STDERR "---> abld build wins (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   319
	$res = `abld build wins`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   320
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   321
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   322
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   323
	# generate MSVC project file
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   324
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   325
	print STDERR "---> abld makefile vc6:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   326
	$res = `abld makefile vc6`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   327
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   328
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   329
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   330
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   331
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   332
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   333
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   334
	if ($target eq "armi")						     	     # ARMI UREL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   335
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   336
	# build armi urel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   337
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   338
	print STDERR "---> abld build armi urel (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   339
	$res = `abld build armi urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   340
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   341
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   342
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   343
	#  freeze exports armi
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   344
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   345
	print STDERR "---> abld freeze armi:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   346
	$res = `abld freeze armi`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   347
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   348
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   349
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   350
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   351
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   352
	print STDERR "---> abld build armi urel (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   353
	$res = `abld build armi urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   354
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   355
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   356
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   357
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   358
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   359
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   360
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   361
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   362
	if ($target eq "thumb")						     	     # THUMB UREL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   363
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   364
	# build thumb urel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   365
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   366
	print STDERR "---> abld build thumb urel (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   367
	$res = `abld build thumb urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   368
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   369
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   370
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   371
	#  freeze exports thumb
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   372
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   373
	print STDERR "---> abld freeze thumb:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   374
	$res = `abld freeze thumb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   375
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   376
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   377
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   378
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   379
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   380
	print STDERR "---> abld build thumb urel (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   381
	$res = `abld build thumb urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   382
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   383
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   384
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   385
	# make sis
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   386
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   387
	print STDERR "---> makesis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   388
	chdir "..\\sis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   389
	$res = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   390
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   391
	if (not ($res =~ m /sis/))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   392
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   393
		chdir "..\\..\\sis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   394
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   395
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   396
	$res = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   397
	$pkgPath = $res;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   398
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   399
	$res = `dir /b *.pkg`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   400
	chomp ($res);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   401
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   402
	if ($res eq "")
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   403
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   404
		print STDERR " failed: .pkg file is not found!\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   405
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   406
	else 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   407
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   408
		$pkgName = $res;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   409
		chomp($pkgName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   410
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   411
		print STDERR " $pkgName:";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   412
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   413
		checkHardcodedPath($pkgName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   414
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   415
		$res = `makesis $pkgName`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   416
		print STDERR "\n$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   417
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   418
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   419
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   420
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   421
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   422
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   423
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   424
	if ($target eq "armv5_urel")					     	     # ARMV5 UREL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   425
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   426
	# build armv5 urel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   427
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   428
	print STDERR "---> abld build armv5 urel (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   429
	$res = `abld build armv5 urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   430
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   431
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   432
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   433
	#  freeze exports armv5
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   434
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   435
	print STDERR "---> abld freeze armv5:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   436
	$res = `abld freeze armv5`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   437
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   438
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   439
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   440
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   441
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   442
	print STDERR "---> abld build armv5 urel (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   443
	$res = `abld build armv5 urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   444
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   445
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   446
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   447
	# make sis
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   448
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   449
	print STDERR "---> makesis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   450
	chdir "..\\sis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   451
	$res = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   452
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   453
	if (not ($res =~ m /sis/))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   454
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   455
		chdir "..\\..\\sis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   456
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   457
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   458
	$res = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   459
	$pkgPath = $res;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   460
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   461
	$res = `dir /b *_armv5.pkg`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   462
	chomp ($res);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   463
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   464
	if ($res eq "")
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   465
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   466
		print STDERR " failed: .pkg file is not found!\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   467
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   468
	else 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   469
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   470
		$pkgName = $res;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   471
		chomp($pkgName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   472
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   473
		print STDERR " $pkgName:";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   474
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   475
		checkHardcodedPath($pkgName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   476
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   477
		$res = `makesis $pkgName`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   478
		print STDERR "\n$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   479
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   480
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   481
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   482
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   483
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   484
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   485
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   486
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   487
	if ($target eq "armv5_udeb")					     	     # ARMV5 UDEB
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   488
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   489
	# build armv5 udeb
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   490
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   491
	print STDERR "---> abld build armv5 udeb (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   492
	$res = `abld build armv5 udeb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   493
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   494
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   495
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   496
	#  freeze exports armv5
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   497
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   498
	print STDERR "---> abld freeze armv5:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   499
	$res = `abld freeze armv5`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   500
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   501
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   502
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   503
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   504
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   505
	print STDERR "---> abld build armv5 udeb (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   506
	$res = `abld build armv5 udeb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   507
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   508
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   509
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   510
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   511
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   512
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   513
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   514
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   515
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   516
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   517
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   518
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   519
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   520
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   521
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   522
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   523
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   524
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   525
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   526
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   527
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   528
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   529
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   530
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   531
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   532
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   533
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   534
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   535
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   536
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   537
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   538
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   539
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   540
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   541
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   542
	if ($target eq "gcce_urel")					     	     # GCCE UREL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   543
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   544
	# build armv5 urel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   545
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   546
	print STDERR "---> abld build gcce urel (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   547
	$res = `abld build gcce urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   548
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   549
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   550
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   551
	#  freeze exports gcce
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   552
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   553
	print STDERR "---> abld freeze gcce:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   554
	$res = `abld freeze gcce`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   555
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   556
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   557
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   558
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   559
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   560
	print STDERR "---> abld build gcce urel (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   561
	$res = `abld build gcce urel`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   562
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   563
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   564
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   565
	# make sis
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   566
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   567
	print STDERR "---> makesis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   568
	chdir "..\\sis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   569
	$res = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   570
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   571
	if (not ($res =~ m /sis/))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   572
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   573
		chdir "..\\..\\sis";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   574
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   575
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   576
	$res = `cd`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   577
	$pkgPath = $res;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   578
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   579
	$res = `dir /b *_gcce.pkg`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   580
	chomp ($res);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   581
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   582
	if ($res eq "")
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   583
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   584
		print STDERR " failed: .pkg file is not found!\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   585
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   586
	else 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   587
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   588
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   589
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   590
		$pkgName = $res;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   591
		chomp($pkgName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   592
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   593
		print STDERR " $pkgName:";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   594
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   595
		checkHardcodedPath($pkgName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   596
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   597
		$res = `makesis $pkgName`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   598
		print STDERR "\n$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   599
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   600
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   601
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   602
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   603
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   604
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   605
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   606
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   607
	if ($target eq "gcce_udeb")					     	     # GCCE UDEB
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   608
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   609
	# build gcce udeb
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   610
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   611
	print STDERR "---> abld build gcce udeb (before freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   612
	$res = `abld build gcce udeb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   613
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   614
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   615
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   616
	#  freeze exports gcce
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   617
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   618
	print STDERR "---> abld freeze gcce:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   619
	$res = `abld freeze gcce`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   620
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   621
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   622
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   623
	# build app after freeze
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   624
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   625
	print STDERR "---> abld build gcce udeb (after freeze):\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   626
	$res = `abld build gcce udeb`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   627
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   628
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   629
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   630
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   631
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   632
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   633
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   634
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   635
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   636
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   637
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   638
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   639
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   640
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   641
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   642
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   643
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   644
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   645
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   646
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   647
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   648
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   649
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   650
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   651
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   652
	if ($target eq "clean")						     # CLEAN
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   653
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   654
	# clean
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   655
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   656
	print STDERR "---> abld clean:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   657
	$res = `abld clean`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   658
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   659
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   660
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   661
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   662
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   663
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   664
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   665
	if ($target eq "reallyclean")					     # REALLYCLEAN
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   666
	{									     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   667
	# reallyclean
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   668
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   669
	print STDERR "---> abld reallyclean:\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   670
	$res = `abld reallyclean`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   671
	print STDERR "$res\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   672
	print ".";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   673
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   674
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   675
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   676
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   677
	# close logfile 						
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   678
	print STDERR "\n\n\n\n\n\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   679
	close STDERR;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   680
	print "\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   681
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   682
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   683
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   684
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   685
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   686
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   687
sub checkHardcodedPath($pkgName)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   688
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   689
	$pkg=$pkgName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   690
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   691
	unless (open FILE, "<$pkg")
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   692
	{ 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   693
	print "\nError: can't open $pkg\n\n"; 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   694
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   695
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   696
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   697
	my @pkgFileLines = <FILE>;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   698
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   699
	foreach my $line (@pkgFileLines)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   700
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   701
		$line =~ s#;.*?\n##gs; # remove comment lines
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   702
		$line =~ tr/A-Z/a-z/;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   703
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   704
		if ($line =~ m /c:\\/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   705
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   706
			print STDERR " Warning: hardcoded installation path!";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   707
			print " Warning: hardcoded installation path!";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   708
			last;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   709
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   710
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   711
	close FILE;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   712
}