Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

########################################################################
# Copyright (C) 2008 ERG Limited, All rights reserved
#
# Module name   : linux_day0fs_tools.pm
# Module type   : JATS Plugin
# Compiler(s)   : PERL
# Environment(s): JATS
#
# Description   : This package extends the JATS toolset at build time
#                 It provides additional directives to the JATS makefiles
#                 to simplify the directives.
#
#                 The directive matches up with a run-time tool to
#                 do the bulk of the work.
#
# Operation     :
#
# Syntax        : Day0Script (<platforms>, ScriptFile, [options]);
#
#......................................................................#

require 5.006_001;
use strict;
use warnings;

#-------------------------------------------------------------------------------
# Function        : Day0Script
#
# Description     : Invoke a Day0 script
#
# Inputs          : $platforms          - Platform selector
#                   $script             - Name of the script to invoke
#                   Options             - Passed to script
#                                         None expected
#
# Returns         : Nothing
#
sub Day0Script
{
    my( $platforms, $script, @opts ) = @_;

    Debug2( "Day0Script", @_ );
    return if ( ! ActivePlatform($platforms) );

    #
    #   Sanity Test
    #
    Error ("Day0Script: No script file provided") unless ( $script );
    
    #
    #   Simply use Generate Files
    #   With lots of options
    #
    Src ( '*', $script );

    #
    #   Create an array of optional comamnd arguments
    #
    GenerateFiles ('*', '--Tool=Proc_day0fs_script.pl',
                        '--Var(BuildName)',                     # Target Package
                        '--Var(BuildVersion)',                  # Target Version
                        '--Var(Platform)',                      # Target platform
                        '--Var(Product)',                       # Day0 App Device Type
                        '--Var(Target)',                        # Underlying Target
                        '--Var(Type)',                          # Build Type
                        '--Var(PackageDir)',                    # Package base dir
                        '--Var(PackageBinDir)',                 # Package bins
                        '--Var(CompilerPath)',                  # Path to compiler
                        '--Var(InterfaceDir)',                  # External Packages
                        '--Var(Verbose)',                       # Verbose operation
                        '--Var(BuildRoot)',                     # Verbose operation
                        "--NoGenerate",                         # Hidden generator
                        "--Clean",                              # Script supports jats clean
                        "-UserScript --Prerequisite($script)",  # User Script
                        @opts,                                  # User options
                        );

}

1;