Subversion Repositories DevTools

Rev

Rev 1469 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1467 alewis 1
########################################################################
2
# Copyright (C) 2008 ERG Limited, All rights reserved
3
#
4
# Module name   : wsdl-tools
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     : This package adds the JATS directive ShellBuild
17
#                 When used the directive will use GenerateFiles to invoke
18
#                 a shell program at make-time to actually do the hard work.
19
#
20
# Directives    : ShellBuild (platform, script, ... )
21
#
22
#......................................................................#
23
 
24
use strict;
25
use warnings;
26
use File::Basename;
27
use JatsError;
28
 
29
#
30
#   Global JATS-internal variables
31
#
32
our $so;                            # Toolset dependent shared library suffix
33
our %SHLIB_LIBS;                    # Hash keyed by known Shared Libraries
34
 
35
#-------------------------------------------------------------------------------
36
# Function        : ShellBuild
37
#
38
# Description     : Launches a shell build script that has had a set of 
39
#                   pre-invoke work performed already.
40
#
41
# Inputs          : platform          - Standard Platform Specifier
42
#                   script            - The shell build script to launch.
43
#                   uargs             - User options
44
#
45
#                     -DownloadPkg=   - Name of the package that has been 
46
#                                       downloaded.  If empty the download package
47
#                                       is generated automatically.
48
#                     -XGccInPath     - Forces the cross compiler GCC to be 
49
#                                       placed in the path directly.
50
#
51
# Returns         : Nothing
52
#
53
sub ShellBuild
54
{
55
    my ($platforms, $script, @uargs) = @_;
56
 
57
    return if ( ! ActivePlatform($platforms) );
58
 
59
    #
60
    #   Generate the files
61
    #   Use standard JATS directive
62
    #
63
    Src($platforms, $script);
64
    GenerateFiles($platforms, '--Tool=shellbuild.sh', '-ShellBuild='.$script,
65
                  '--Var(BuildName)',               # Target Package
66
                  '--Var(BuildVersion)',            # Target Package Version
67
                  '--Var(Platform)',                # Target platform
68
                  '--Var(Type)',                    # Build Type
69
                  '--Var(Arch)',                    # Architecture
70
                  '--Var(MachType)',                # Machine Type
71
                  '--Var(BuildRoot)',               # Build Root
72
                  '--Var(CompilerPath)',            # Path to compiler
73
                  '--Var(PackageBinDir)',           # Package Bin dir
74
                  '--Var(PackageIncDir)',           # Package Inc dir
75
                  '--Var(PackageLibDir)',           # Package Lib dir
76
                  '--Var(PackagePkgDir)',           # Package Pkg dir
77
                  '--Var(PackageDir)',              # Package dir
78
                  '--Var(PackageToolDir)',          # Tools dir
79
                  '--Var(PackageToolBin)',          # Tools binaries dir
80
                  '--Var(PackageToolScript)',       # Tools scripts dir
81
                  "--NoGenerate", "--Clean", @uargs );
82
}
83
 
84
#-------------------------------------------------------------------------------
85
# Function        : DebianShellBuild
86
#
87
# Description     : Launches a shell build script that has had a set of 
88
#                   pre-invoke work performed already.  Once the script
89
#                   Completes a Debian package builder is launched.
90
#
91
# Inputs          : platform          - Standard Platform Specifier
92
#                   script            - The shell build script to launch.
93
#                   uargs             - User options, as per ShellBuild().
94
#
95
# Returns         : Nothing
96
#
97
sub DebianShellBuild
98
{
99
    my ($platforms, $script, @uargs) = @_;
100
 
101
    return if ( ! ActivePlatform($platforms) );
102
 
103
    # Generate the files using ShellBuild()
104
    ShellBuild($platforms, $script, '-DebianPackage', @uargs);
105
 
106
    MakeDebianPackage($platforms, '--Script=.deb/debbuild.pl' );
107
}
108
 
109
1;