os/mm/mmtestenv/mmtesttools/Build/mmbuild.pl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmtestenv/mmtesttools/Build/mmbuild.pl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,574 @@
     1.4 +# Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +# All rights reserved.
     1.6 +# This component and the accompanying materials are made available
     1.7 +# under the terms of "Eclipse Public License v1.0"
     1.8 +# which accompanies this distribution, and is available
     1.9 +# at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +#
    1.11 +# Initial Contributors:
    1.12 +# Nokia Corporation - initial contribution.
    1.13 +#
    1.14 +# Contributors:
    1.15 +#
    1.16 +# Description:
    1.17 +#
    1.18 +
    1.19 +use strict;
    1.20 +use Env qw(EPOCROOT);
    1.21 +
    1.22 +# literals
    1.23 +my $icl_param  =  "-i";
    1.24 +my $misc_param =  "-c";
    1.25 +my $mmf_param  =  "-m";
    1.26 +my $all_param  =  "-f";
    1.27 +my $test_param =  "-t";
    1.28 +my $testBuild_param = "-b";
    1.29 +my $extra_param = "-x";
    1.30 +my $keep_param =  "-k";
    1.31 +my $gccxml_param = "-g";
    1.32 +my $skipMake_param = "-s";
    1.33 +
    1.34 +my $setup_comm = "setup";
    1.35 +my $clean_comm = "clean";
    1.36 +my $build_comm = "build";
    1.37 +
    1.38 +my @known_targets = ("wins", "winscw", "arm4", "armi","armv5", "gccxml", "thumb", "mcot", "misa", "mint");
    1.39 +
    1.40 +my @Cedar_targets = ("winscw", "armv5");    # gccxml must be added explicitly with -g and even then only build gccxml on main code
    1.41 +my @Beech_targets = ("wins", "winscw", "thumb", "mcot");
    1.42 +
    1.43 +my @default_targets = @Cedar_targets;
    1.44 +
    1.45 +my @physical_targets = ("mcot", "misa", "mint"); # those we just re-build sound drivers for
    1.46 +my $gccxml_target = "gccxml";
    1.47 +my $x86gcc_target = "x86gcc";
    1.48 +my @stages = ("export", "makefile", "library", "resource", "target", "final");
    1.49 +my @tbstages = ("test export", "test makefile", "test library", "test resource", "test target", "test final");
    1.50 +my @stagesTakingTarget = ("makefile", "library", "resource", "target", "final",
    1.51 +                          "test makefile", "test library", "test resource", "test target", "test final");
    1.52 +my $eka2IdentifyFile  = "$ENV{EPOCROOT}epoc32\\release\\winscw\\udeb\\winsgui.dll"; # if file present, is EKA2 build
    1.53 +my $x86gccIdentifyFile  = "$ENV{EPOCROOT}epoc32\\release\\x86gcc\\udeb\\euser.dll"; # if dir present, x86 environment present
    1.54 +
    1.55 +my @targets;
    1.56 +my $component = ""; # default added later
    1.57 +my $extras = "";
    1.58 +my $test = "";
    1.59 +my $testBuild = "";
    1.60 +my $command = "";
    1.61 +my $keep = "";
    1.62 +my $use_gccxml = "";
    1.63 +my $skipMake = "";
    1.64 +
    1.65 +my $main_mbc = "__main.mbc";
    1.66 +my $test_mbc = "__test.mbc";
    1.67 +my $testBuild_mbc = "__testBuild.mbc";
    1.68 +my $phys_mbc = "__phys.mbc";
    1.69 +my $metabld = "metabld";
    1.70 +
    1.71 +my $targetToolsDir = "..\\..\\..\\..\\..\\TargetTools\\Build";
    1.72 +my $TargetToolsExists = 0;
    1.73 +if (-d $targetToolsDir)
    1.74 +	{
    1.75 +	$TargetToolsExists = 1;
    1.76 +	print "TargetTools directory exists: $targetToolsDir\n"
    1.77 +	}
    1.78 +
    1.79 +# main:
    1.80 +	{
    1.81 +	# Process command-line
    1.82 +
    1.83 +	unless (@ARGV)
    1.84 +		{
    1.85 +		&Usage();
    1.86 +		}
    1.87 +
    1.88 +	&ReadArgs();
    1.89 +
    1.90 +	die "EPOCROOT is not set" unless ($EPOCROOT ne "");
    1.91 +
    1.92 +	$| = 1; # autoflush stdout.
    1.93 +
    1.94 +	if ($command eq $setup_comm)
    1.95 +		{
    1.96 +		&Setup();
    1.97 +		}
    1.98 +	elsif ($command eq $clean_comm)
    1.99 +		{
   1.100 +		&Clean();
   1.101 +		}
   1.102 +	elsif ($command eq $build_comm)
   1.103 +		{
   1.104 +		&Build();
   1.105 +		}
   1.106 +	else
   1.107 +		{
   1.108 +		die "Unknown command";
   1.109 +		}
   1.110 +	exit 0;
   1.111 +	}
   1.112 +
   1.113 +#
   1.114 +# Subroutines
   1.115 +#
   1.116 +
   1.117 +sub ReadArgs()
   1.118 +	{
   1.119 +	while (@ARGV)
   1.120 +		{
   1.121 +		my $param = @ARGV[0]; shift @ARGV; # grab first param and shift along
   1.122 +		
   1.123 +		if ($param eq "") # ignore blank parameters
   1.124 +			{
   1.125 +			next;
   1.126 +			}
   1.127 +
   1.128 +		if ($param eq $icl_param || $param eq $misc_param ||
   1.129 +		    $param eq $mmf_param || $param eq $all_param)
   1.130 +			{
   1.131 +			$component = $param;
   1.132 +			}
   1.133 +		elsif ($param eq $test_param)
   1.134 +			{
   1.135 +			$test = $param;
   1.136 +			}
   1.137 +		elsif ($param eq $testBuild_param)
   1.138 +			{
   1.139 +			$testBuild = $param;
   1.140 +			}
   1.141 +		elsif ($param eq $extra_param)
   1.142 +			{
   1.143 +			$extras = $param;
   1.144 +			}
   1.145 +		elsif ($param eq $keep_param)
   1.146 +			{
   1.147 +			$keep = $param;
   1.148 +			}
   1.149 +		elsif ($param eq $gccxml_param)
   1.150 +			{
   1.151 +			$use_gccxml = $param;
   1.152 +			}
   1.153 +		elsif ($param eq $skipMake_param)
   1.154 +			{
   1.155 +			$skipMake = $param;
   1.156 +			}
   1.157 +		elsif ($param eq $setup_comm || $param eq $clean_comm ||
   1.158 +		       $param eq $build_comm)
   1.159 +			{
   1.160 +			if ($command ne "")
   1.161 +				{
   1.162 +				&Usage; # scream if we try to state more than one command
   1.163 +				}
   1.164 +			$command = $param;
   1.165 +			}
   1.166 +		elsif ($command eq $build_comm)
   1.167 +			{
   1.168 +			# see if the parameter is one of the list of arguments
   1.169 +			my $match = 0;
   1.170 +			foreach my $target (@known_targets)
   1.171 +				{
   1.172 +				if ($target eq $param)
   1.173 +					{
   1.174 +					$match = 1;
   1.175 +					last; # exit loop
   1.176 +					}
   1.177 +				}
   1.178 +			if ($match != 0)
   1.179 +				{
   1.180 +				$targets[++$#targets] = $param; # append
   1.181 +				}
   1.182 +			else
   1.183 +				{
   1.184 +				# was not a valid target
   1.185 +				Usage();
   1.186 +				}
   1.187 +			}
   1.188 +		else
   1.189 +			{
   1.190 +			# unknown setting
   1.191 +			&Usage();
   1.192 +			}
   1.193 +		}
   1.194 +	&CheckArgs();
   1.195 +	}
   1.196 +
   1.197 +sub CheckArgs()
   1.198 +	{
   1.199 +	# check that the arguments make sense
   1.200 +	if ($command eq $clean_comm || $command eq $build_comm)
   1.201 +		{
   1.202 +		# for build and cleanup, can't set the required module
   1.203 +		if ($component ne "" || $extras ne "")
   1.204 +			{
   1.205 +			&Usage;
   1.206 +			}
   1.207 +		}
   1.208 +	# for setup, check -t has not been given
   1.209 +	if ($command eq $setup_comm)
   1.210 +		{
   1.211 +		if ($test ne "")
   1.212 +			{
   1.213 +			&Usage;
   1.214 +			}
   1.215 +		}
   1.216 +	if ($command eq "")
   1.217 +		{
   1.218 +		# need to state some command
   1.219 +		&Usage;
   1.220 +		}
   1.221 +	}
   1.222 +
   1.223 +sub Setup
   1.224 +	{
   1.225 +	# default settings
   1.226 +	if ($component eq "")
   1.227 +		{
   1.228 +		$component = $all_param;
   1.229 +		}
   1.230 +	# some boolean values
   1.231 +	my $want_mmf = $component eq $mmf_param | $component eq $all_param;
   1.232 +	my $want_icl = $component eq $icl_param | $component eq $all_param;
   1.233 +	my $want_misc = $component eq $misc_param | $component eq $all_param;
   1.234 +	my $want_extra = $extras ne "";
   1.235 +	# generate .mbc files and then do bldmake
   1.236 +	open(OUTFILE, ">".$main_mbc) or die "Can't create file: $!";
   1.237 +	print OUTFILE "//\n//Auto-generated - do not edit!!\n//\n\n";
   1.238 +	print OUTFILE "#include \"mmf.mbc\"\n" if ($want_mmf);
   1.239 +	print OUTFILE "#include \"icl.mbc\"\n" if ($want_icl);
   1.240 +	print OUTFILE "#include \"Misc.mbc\"\n" if ($want_misc);
   1.241 +	print OUTFILE "#include \"mmfOpt.mbc\"\n" if ($want_mmf && $want_extra);
   1.242 +	print OUTFILE "#include \"iclOpt.mbc\"\n" if ($want_icl && $want_extra);
   1.243 +	print OUTFILE "#include \"MiscOpt.mbc\"\n" if ($want_misc && $want_extra);
   1.244 +	close OUTFILE;
   1.245 +
   1.246 +	if ($want_mmf)
   1.247 +		{
   1.248 +		open(OUTFILE, ">".$phys_mbc) or die "Can't create file: $!";
   1.249 +		print OUTFILE "//\n//Auto-generated - do not edit!!\n//\n\n";
   1.250 +		print OUTFILE "#include \"mmfPhys.mbc\"\n";
   1.251 +		print OUTFILE "#include \"mmfOptPhys.mbc\"\n" if ($want_extra);
   1.252 +		close OUTFILE;
   1.253 +		}
   1.254 +	else
   1.255 +		{
   1.256 +		# only applicable for mmf - otherwise just delete the file
   1.257 +		if (-f $phys_mbc)
   1.258 +			{
   1.259 +			unlink $phys_mbc or die "Couldn't delete $phys_mbc";
   1.260 +			}
   1.261 +		}
   1.262 +
   1.263 +	open(OUTFILE, ">".$test_mbc) or die "Can't create file: $!";
   1.264 +	print OUTFILE "//\n//Auto-generated - do not edit!!\n//\n\n";
   1.265 +	print OUTFILE "#include \"AllTests.mbc\"\n";
   1.266 +	print OUTFILE "#include \"TestFrameworkTest.mbc\"\n";
   1.267 +	print OUTFILE "#include \"mmfTest.mbc\"\n" if ($want_mmf);
   1.268 +	print OUTFILE "#include \"mmfNotOptTest.mbc\"\n" if ($want_mmf && !$want_extra);
   1.269 +	print OUTFILE "#include \"iclTest.mbc\"\n" if ($want_icl);
   1.270 +	print OUTFILE "#include \"MiscTest.mbc\"\n" if ($want_misc);
   1.271 +	print OUTFILE "#include \"mmfOptTest.mbc\"\n" if ($want_mmf && $want_extra);
   1.272 +	print OUTFILE "#include \"iclOptTest.mbc\"\n" if ($want_icl && $want_extra);
   1.273 +	print OUTFILE "#include \"MiscOptTest.mbc\"\n" if ($want_misc && $want_extra);
   1.274 +	if ($TargetToolsExists)
   1.275 +		{
   1.276 +		print OUTFILE "#include \"TargetTools.mbc\"\n";
   1.277 +		}
   1.278 +	close OUTFILE;
   1.279 +
   1.280 +	open(OUTFILE, ">".$testBuild_mbc) or die "Can't create file: $!";
   1.281 +	print OUTFILE "//\n//Auto-generated - do not edit!!\n//\n\n";
   1.282 +	print OUTFILE "#include \"mmfTestBuild.mbc\"\n" if ($want_mmf);
   1.283 +	print OUTFILE "#include \"iclTestBuild.mbc\"\n" if ($want_icl);
   1.284 +	print OUTFILE "#include \"MiscTestBuild.mbc\"\n" if ($want_misc);
   1.285 +	print OUTFILE "#include \"mmfOptTestBuild.mbc\"\n" if ($want_mmf && $want_extra);
   1.286 +	print OUTFILE "#include \"iclOptTestBuild.mbc\"\n" if ($want_icl && $want_extra);
   1.287 +	print OUTFILE "#include \"MiscOptTestBuild.mbc\"\n" if ($want_misc && $want_extra);
   1.288 +	close OUTFILE;
   1.289 +
   1.290 +	# first getmake does bldmake on the main entries
   1.291 +	my $sysComm = $metabld . " " . $main_mbc . " bldmake " . $keep . " bldfiles";
   1.292 +	my $result = system($sysComm);
   1.293 +	if ($result != 0 && $keep eq "")
   1.294 +		{
   1.295 +		print "Error '$sysComm' failed: $result\n";
   1.296 +		exit ($result);
   1.297 +		}
   1.298 +	my $error = $result;
   1.299 +	# second metabld goes through physical
   1.300 +	if (-f $phys_mbc)
   1.301 +		{
   1.302 +		$sysComm = $metabld . " " . $phys_mbc . " bldmake " . $keep . " bldfiles";
   1.303 +		$result = system($sysComm);
   1.304 +		if ($result != 0 && $keep eq "")
   1.305 +			{
   1.306 +			print "Error '$sysComm' failed: $result\n";
   1.307 +			exit ($result);
   1.308 +			}
   1.309 +		$error |= $result;
   1.310 +		}
   1.311 +	# third metabld goes through tests
   1.312 +	$sysComm = $metabld . " " . $test_mbc . " bldmake " . $keep . " bldfiles";
   1.313 +	$result = system($sysComm);
   1.314 +	if ($result != 0 && $keep eq "")
   1.315 +		{
   1.316 +		print "Error '$sysComm' failed: $result\n";
   1.317 +		exit ($result);
   1.318 +		}
   1.319 +	$error |= $result;
   1.320 +	# fourth metabld goes through test build tests - ignore any dups with the above. Does not make any difference
   1.321 +	$sysComm = $metabld . " " . $testBuild_mbc . " bldmake " . $keep . " bldfiles";
   1.322 +	$result = system($sysComm);
   1.323 +	if ($result != 0 && $keep eq "")
   1.324 +		{
   1.325 +		print "Error '$sysComm' failed: $result\n";
   1.326 +		exit ($result);
   1.327 +		}
   1.328 +	$error |= $result;
   1.329 +	if ($error)
   1.330 +		{
   1.331 +  		print "Errors found during run\n";
   1.332 +		exit ($error)
   1.333 +		}
   1.334 +	}
   1.335 +
   1.336 +sub Clean
   1.337 +	{
   1.338 +	# first getmake does makefiles on the main entries
   1.339 +	# note we generally ignore any errors on this
   1.340 +	my $sysComm = $metabld . " " . $main_mbc . " abld " . $keep . " makefile";
   1.341 +	system($sysComm);
   1.342 +	if (-f $phys_mbc)
   1.343 +		{
   1.344 +		my $sysComm = $metabld . " " . $phys_mbc . " abld " . $keep . " makefile";
   1.345 +		system($sysComm);
   1.346 +		}
   1.347 +	if ($test eq $test_param)
   1.348 +		{
   1.349 +		# also do for test files
   1.350 +		$sysComm = $metabld . " " . $test_mbc . " abld " . $keep . " makefile";
   1.351 +		system($sysComm);
   1.352 +		$sysComm = $metabld . " " . $testBuild_mbc . " abld " . $keep . " test makefile";
   1.353 +		system($sysComm);
   1.354 +		}
   1.355 +	my $sysComm = $metabld . " " . $main_mbc . " abld " . $keep . " reallyclean";
   1.356 +	system($sysComm);
   1.357 +	if (-f $phys_mbc)
   1.358 +		{
   1.359 +		my $sysComm = $metabld . " " . $phys_mbc . " abld " . $keep . " reallyclean";
   1.360 +		system($sysComm);
   1.361 +		}
   1.362 +	if ($test eq $test_param)
   1.363 +		{
   1.364 +		# also do for test file
   1.365 +		$sysComm = $metabld . " " . $test_mbc . " abld " . $keep . " reallyclean";
   1.366 +		system($sysComm);
   1.367 +		$sysComm = $metabld . " " . $testBuild_mbc . " abld " . $keep . " test reallyclean";
   1.368 +		system($sysComm);
   1.369 +		}
   1.370 +
   1.371 +	}
   1.372 +
   1.373 +sub Build
   1.374 +	{
   1.375 +	# defaults
   1.376 +	if (!(-f $eka2IdentifyFile)) 
   1.377 +	    {
   1.378 +		@default_targets = @Beech_targets;
   1.379 +	    }
   1.380 +
   1.381 +	if (@targets == 0)
   1.382 +		{
   1.383 +		@targets = @default_targets;
   1.384 +		}
   1.385 +	if ($use_gccxml ne "")
   1.386 +		{
   1.387 +		$targets[++$#targets] = $gccxml_target; # append		
   1.388 +		}
   1.389 +	if ((-f $x86gccIdentifyFile)) 
   1.390 +	        {
   1.391 +		$targets[++$#targets] = $x86gcc_target; # append x86gcc target since Build env present.
   1.392 +		}	
   1.393 +	# for each target we need to go through each stage
   1.394 +	# if -k was given, we make all calls and give error at the end
   1.395 +	my $error = 0;
   1.396 +	foreach my $target (@targets)
   1.397 +		{
   1.398 +		# work out which .mbc files to use. Key is as follows
   1.399 +		#    in physical targets and not test, __test.mbc
   1.400 +		#    in physical targets and test, skip - not currently supported
   1.401 +		#    not in physical targets and not test, __main.mbc
   1.402 +		#    not in physical targets and test, __test.mbc
   1.403 +		my $build_test = $test ne ""; # -t has been given
   1.404 +		my $build_testBuild = $test ne "" && $testBuild ne ""; # -t and -b has been given
   1.405 +		my $physical_target = 0;
   1.406 +		foreach my $phys (@physical_targets)
   1.407 +			{
   1.408 +			if ($phys eq $target)
   1.409 +				{
   1.410 +				$physical_target = 1;
   1.411 +				last; # exit loop
   1.412 +				}
   1.413 +			}
   1.414 +		my $mbc;
   1.415 +		if ($physical_target && !$test)
   1.416 +			{
   1.417 +			if (-f $phys_mbc)
   1.418 +				{
   1.419 +				$mbc = $phys_mbc;
   1.420 +				}
   1.421 +			else
   1.422 +				{
   1.423 +				# we don't want to do anything - skip to next target
   1.424 +				next; 
   1.425 +				}
   1.426 +			}
   1.427 +		elsif ($physical_target && $test)
   1.428 +			{
   1.429 +			next; # skip to next target
   1.430 +			}
   1.431 +		elsif (($target eq "gccxml") && $test) # Build GCCXML on the production code only
   1.432 +			{
   1.433 +			next; # skip to next target
   1.434 +			}
   1.435 +		elsif (!$physical_target && !$test)
   1.436 +			{
   1.437 +			$mbc = $main_mbc;
   1.438 +			}		
   1.439 +		elsif ($test ne "")
   1.440 +			{
   1.441 +			if (!$testBuild)
   1.442 +				{
   1.443 +				$mbc = $test_mbc;
   1.444 +				}
   1.445 +			else
   1.446 +				{
   1.447 +				$mbc = $testBuild_mbc;
   1.448 +				}
   1.449 +			}
   1.450 +			
   1.451 +		# if the target is "wins", then check to see if wins is installed and otherwise just do export
   1.452 +		# this is intended to get around Cedar builds not having wins. Really out to check for VC++ too,
   1.453 +		# but not clear how
   1.454 +		my @reqStages = @stages;
   1.455 +		@reqStages = @tbstages if $build_testBuild;
   1.456 +		if ($target eq "wins")
   1.457 +			{
   1.458 +			my $euser_lib = $EPOCROOT . "epoc32\\release\\wins\\udeb\\euser.lib";
   1.459 +			if (! -f $euser_lib)
   1.460 +				{
   1.461 +				print "no WINS installation found - just export\n";
   1.462 +				@reqStages = ( "export" );
   1.463 +				}
   1.464 +			}
   1.465 +
   1.466 +
   1.467 +			
   1.468 +		# now the main loop
   1.469 +		foreach my $stage (@reqStages)
   1.470 +			{
   1.471 +			# export does not take target as parameter, others do
   1.472 +			my $takesTarget = 0;
   1.473 +			foreach my $stage2 (@stagesTakingTarget)
   1.474 +				{
   1.475 +				if ($stage eq $stage2)
   1.476 +					{
   1.477 +					$takesTarget = 1;
   1.478 +					last; # exit loop
   1.479 +					}
   1.480 +				}
   1.481 +			if (($stage eq "makefile" || $stage eq "test makefile") && $skipMake ne "")
   1.482 +				{
   1.483 +				print "Skip makefile\n"; 
   1.484 +				next; # skip the makefile stage
   1.485 +				}
   1.486 +			# the command - metabld xxx.mbc command
   1.487 +			my $sysComm = $metabld . " " . $mbc .
   1.488 +			    " abld " . $keep . " " . $stage;
   1.489 +			if ($takesTarget)
   1.490 +				{
   1.491 +				$sysComm .= " " . $target;
   1.492 +				}
   1.493 +			my $result = system($sysComm);
   1.494 +			if ($result != 0)
   1.495 +				{
   1.496 +				if ($keep ne "")
   1.497 +					{
   1.498 +					# remember error and keep going
   1.499 +					$error |= $result;
   1.500 +					}
   1.501 +				else
   1.502 +					{
   1.503 +					print "Error '$sysComm' failed: $result\n";
   1.504 +					exit ($result);
   1.505 +					}
   1.506 +				}
   1.507 +			}
   1.508 +		}
   1.509 +	if ($error)
   1.510 +		{
   1.511 +  		print "Errors found during run\n";
   1.512 +		exit ($error)
   1.513 +		}
   1.514 +	}
   1.515 +
   1.516 +sub Usage
   1.517 +	{
   1.518 +	# print usage statement and exit
   1.519 +	print <<ENDHERESTRING;
   1.520 +usage:
   1.521 +	mmbuild {-i|-e|-m|-f} [-x] [-k] setup
   1.522 +	mmbuild [-t] [-k] clean
   1.523 +	mmbuild [-t [-b]] [-k] [-g] [-s] build [targets]
   1.524 +
   1.525 +mmbuild is intended to do a full build of the Multimedia source area, both for
   1.526 +use in test builds and by team engineers. The effect will be similar to that
   1.527 +achieved for overnight builds, although the mechanism is slight different.
   1.528 +
   1.529 +In typical usage, the various forms of the command - as given above - are used
   1.530 +in turn. "setup" equates roughly to "bldmake bldfiles". It is called to setup
   1.531 +the various files prior to the build proper. The parameters are as follows:
   1.532 +
   1.533 +-i) Build ICL only
   1.534 +-m) Build MMF only
   1.535 +-c) Build Misc only (other than ICL or MMF)
   1.536 +-f) Build all Multimedia components (default)
   1.537 +
   1.538 +-x) Additionally build any optional components - default is non-optional only
   1.539 +
   1.540 +"clean" effectively does a reallyclean operation.
   1.541 +
   1.542 +-t) Clean test code, *as well as* main code - default is to clean main code only
   1.543 +
   1.544 +"build" does a build operation. Optional parameters give the target list - the
   1.545 +default is "wins", "winscw", "arm4" and "mcot". For physical targets, like mcot,
   1.546 +only the SoundDev mmf folder is built.
   1.547 +
   1.548 +-t) Build test code (including testframework), *instead of* main code - default
   1.549 +is to build main code only
   1.550 +
   1.551 +-t) Build test code (including testframework), *instead of* main code 
   1.552 +    Note: without -b this is test code built via "abld build"
   1.553 +
   1.554 +-b) When given with -t, build test code that is built via "abld test build"
   1.555 +
   1.556 +-g) Build code additionally for gccxml. Null operation when used with -t. 
   1.557 +
   1.558 +-s) Skip the make stage. Use with care - should not be used if any include, 
   1.559 +source list or library list have been changed, and never on the first time 
   1.560 +called. However, it can save time on a subsequent call.
   1.561 +
   1.562 +A typical usage sequence would be:
   1.563 +	mmbuild setup
   1.564 +	mmbuild -t clean
   1.565 +	mmbuild build
   1.566 +	mmbuild -t build
   1.567 +	mmbuild -t -b build
   1.568 +
   1.569 +which would do a reallyclean and rebuild of the whole Multimedia sub-system,
   1.570 +except the mcot sound drivers on EKA1.
   1.571 +
   1.572 +For each command, the -k flag will try and keep going as much as possible -
   1.573 +setup and build, by default, will stop with the first error.
   1.574 +ENDHERESTRING
   1.575 +	exit 1;
   1.576 +	}
   1.577 +