Subversion Repositories DevTools

Rev

Rev 6485 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6485 Rev 6528
Line 358... Line 358...
358
}
358
}
359
 
359
 
360
#
360
#
361
#   Call the build script - first setup the environment, then enter the script.
361
#   Call the build script - first setup the environment, then enter the script.
362
#
362
#
363
$opt_SHELLBUILD=~tr{/}{\\};
-
 
364
$WORK_DIR=~tr{/}{\\};
-
 
365
$opt_PKG_BIN_DIR=~tr{/}{\\};
-
 
366
$opt_PKG_INC_DIR=~tr{/}{\\};
-
 
367
$opt_PKG_LIB_DIR=~tr{/}{\\};
-
 
368
$opt_PKG_PKG_DIR=~tr{/}{\\}; 
-
 
369
 
-
 
370
$opt_PKG_TOOL_DIR=~tr{/}{\\}; 
-
 
371
$opt_PKG_TOOL_BIN_DIR=~tr{/}{\\}; 
-
 
372
$opt_PKG_TOOL_SCRIPT_DIR=~tr{/}{\\}; 
-
 
373
 
-
 
374
$opt_INTERFACE_DIR=~tr{/}{\\}; 
-
 
375
 
363
 
376
$ENV{WORK_DIR}=$WORK_DIR;
364
ExportDir('WORK_DIR', $WORK_DIR);
377
$ENV{DOWNLOAD_PKG}=$opt_BUILD_NAME;
365
$ENV{DOWNLOAD_PKG}=$opt_BUILD_NAME;
378
$ENV{PLATFORM}=$opt_PLATFORM;
366
$ENV{PLATFORM}=$opt_PLATFORM;
379
$ENV{TYPE}=$opt_TYPE;
367
$ENV{TYPE}=$opt_TYPE;
-
 
368
 
-
 
369
ExportDir('PKG_DIR'    , $opt_PKG_DIR    );
380
$ENV{PKG_BIN_DIR}=$opt_PKG_BIN_DIR;
370
ExportDir('PKG_BIN_DIR', $opt_PKG_BIN_DIR);
381
$ENV{PKG_INC_DIR}=$opt_PKG_INC_DIR;
371
ExportDir('PKG_INC_DIR', $opt_PKG_INC_DIR);
382
$ENV{PKG_LIB_DIR}=$opt_PKG_LIB_DIR;
372
ExportDir('PKG_LIB_DIR', $opt_PKG_LIB_DIR);
383
$ENV{PKG_PKG_DIR}=$opt_PKG_PKG_DIR;
373
ExportDir('PKG_PKG_DIR', $opt_PKG_PKG_DIR);
-
 
374
 
-
 
375
ExportDir('LOCAL_DIR'    , $opt_LOCAL_DIR    );
-
 
376
ExportDir('LOCAL_BIN_DIR', $opt_LOCAL_BIN_DIR);
-
 
377
ExportDir('LOCAL_INC_DIR', $opt_LOCAL_INC_DIR);
-
 
378
ExportDir('LOCAL_LIB_DIR', $opt_LOCAL_LIB_DIR);
-
 
379
 
-
 
380
ExportDir('BIN_DIR'    , $opt_BIN_DIR    );
-
 
381
ExportDir('OBJ_DIR'    , $opt_OBJ_DIR    );
-
 
382
ExportDir('LIB_DIR'    , $opt_LIB_DIR    );
384
 
383
 
385
if ($opt_ISA_TOOLSET)
384
if ($opt_ISA_TOOLSET)
386
{
385
{
387
    $ENV{PKG_TOOL_DIR}=$opt_PKG_TOOL_DIR;
386
    ExportDir('PKG_TOOL_DIR'        ,$opt_PKG_TOOL_DIR );
388
    $ENV{PKG_TOOL_BIN_DIR}=$opt_PKG_TOOL_BIN_DIR;
387
    ExportDir('PKG_TOOL_BIN_DIR'    ,$opt_PKG_TOOL_BIN_DIR );
389
    $ENV{PKG_TOOL_SCRIPT_DIR}=$opt_PKG_TOOL_SCRIPT_DIR;
388
    ExportDir('PKG_TOOL_SCRIPT_DIR' ,$opt_PKG_TOOL_SCRIPT_DIR );
390
    $ENV{PKG_TOOL_ISA_TOOLSET}=1;
389
    $ENV{PKG_TOOL_ISA_TOOLSET}=1;
391
}
390
}
392
 
391
 
-
 
392
ExportDir('INTERFACE_DIR'     , $opt_INTERFACE_DIR);
393
$ENV{INTERFACE_LIB_DIR}="$opt_INTERFACE_DIR\\lib\\$opt_PLATFORM";
393
ExportDir('INTERFACE_LIB_DIR' , "$opt_INTERFACE_DIR/lib/$opt_PLATFORM");
394
$ENV{INTERFACE_INC_DIR}="$opt_INTERFACE_DIR\\include";
394
ExportDir('INTERFACE_INC_DIR' , "$opt_INTERFACE_DIR/include");
395
 
395
 
396
# Clean-up the various flags that can impact nmake.
396
# Clean-up the various flags that can impact nmake.
397
my $cur_MAKEFLAGS=$ENV{MAKEFLAGS};
-
 
398
my $cur_MAKE=$ENV{MAKE};
-
 
399
 
-
 
400
$ENV{MAKEFLAGS}='';
397
$ENV{MAKEFLAGS}='';
401
$ENV{MAKE}='';
398
$ENV{MAKE}='';
402
 
399
 
-
 
400
$opt_SHELLBUILD=~tr{/}{\\};
403
$result=System("$opt_SHELLBUILD");
401
$result=System("$opt_SHELLBUILD");
404
if ($result != 0 ) 
402
if ($result != 0 ) 
405
{
403
{
406
    Error("Shell build failed with code $result");
404
    Error("Shell build failed with code $result");
407
}
405
}
408
 
406
 
409
# Restore the flags.
-
 
410
$ENV{MAKEFLAGS}=$cur_MAKEFLAGS;
-
 
411
$ENV{MAKE}=$cur_MAKE;
-
 
412
 
-
 
413
 
-
 
414
Message " --> All Done";
407
Message " --> All Done";
415
exit 0;
408
exit 0;
-
 
409
 
-
 
410
#-------------------------------------------------------------------------------
-
 
411
# Function        : ExportDir 
-
 
412
#
-
 
413
# Description     : Export a directory into the Windows environment 
-
 
414
#
-
 
415
# Inputs          : VarName     - Target Var Name
-
 
416
#                   Data        - Data to set     
-
 
417
#
-
 
418
# Returns         : Cleaned up data  
-
 
419
#
-
 
420
sub ExportDir
-
 
421
{
-
 
422
    my ($varName, $data) = @_;
-
 
423
    $data=~tr{/}{\\};
-
 
424
    $ENV{$varName} = $data;
-
 
425
 
-
 
426
    return $data;
-
 
427
}