Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1105 dpurdie 1
########################################################################
2
# Copyright (C) 2008 ERG Limited, All rights reserved
3
#
4
# Module name   : linux_day0fs_tools.pm
5
# Module type   : JATS Plugin
6
# Compiler(s)   : PERL
7
# Environment(s): JATS
8
#
9
# Description   : This package extends the JATS toolset at build time
10
#                 It provides additional directives to the JATS makefiles
11
#                 to simplify the directives.
12
#
13
#                 The directive matches up with a run-time tool to
14
#                 do the bulk of the work.
15
#
16
# Operation     :
17
#
18
# Syntax        : Day0Script (<platforms>, ScriptFile, [options]);
19
#
20
#......................................................................#
21
 
22
require 5.006_001;
23
use strict;
24
use warnings;
25
 
26
#-------------------------------------------------------------------------------
27
# Function        : Day0Script
28
#
29
# Description     : Invoke a Day0 script
30
#
31
# Inputs          : $platforms          - Platform selector
32
#                   $script             - Name of the script to invoke
33
#                   Options             - Passed to script
34
#                                         None expected
35
#
36
# Returns         : Nothing
37
#
38
sub Day0Script
39
{
40
    my( $platforms, $script, @opts ) = @_;
41
 
42
    Debug2( "Day0Script", @_ );
43
    return if ( ! ActivePlatform($platforms) );
44
 
45
    #
46
    #   Sanity Test
47
    #
48
    Error ("Day0Script: No script file provided") unless ( $script );
49
 
50
    #
51
    #   Simply use Generate Files
52
    #   With lots of options
53
    #
54
    Src ( '*', $script );
55
 
56
    #
57
    #   Create an array of optional comamnd arguments
58
    #
59
    GenerateFiles ('*', '--Tool=Proc_day0fs_script.pl',
60
                        '--Var(BuildName)',                     # Target Package
61
                        '--Var(BuildVersion)',                  # Target Version
62
                        '--Var(Platform)',                      # Target platform
63
                        '--Var(Product)',                       # Day0 App Device Type
64
                        '--Var(Target)',                        # Underlying Target
65
                        '--Var(Type)',                          # Build Type
66
                        '--Var(PackageDir)',                    # Package base dir
67
                        '--Var(PackageBinDir)',                 # Package bins
68
                        '--Var(CompilerPath)',                  # Path to compiler
69
                        '--Var(InterfaceDir)',                  # External Packages
70
                        '--Var(Verbose)',                       # Verbose operation
71
                        '--Var(BuildRoot)',                     # Verbose operation
72
                        "--NoGenerate",                         # Hidden generator
73
                        "--Clean",                              # Script supports jats clean
74
                        "-UserScript --Prerequisite($script)",  # User Script
75
                        @opts,                                  # User options
76
                        );
77
 
78
}
79
 
80
1;