Subversion Repositories DevTools

Rev

Rev 5709 | Rev 6294 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5709 Rev 6177
Line 1... Line 1...
1
#..
1
#..
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
3
#
3
#
4
# Module name   : JAVA
4
# Module name   : JAVA
5
# Module type   : Makefile system
5
# Module type   : Makefile system
6
# Compiler(s)   : None
6
# Compiler(s)   : None
7
# Environment(s): All
7
# Environment(s): All
Line 87... Line 87...
87
 
87
 
88
    ToolsetDefine ( "\n#..    Specify the version of JAVA to use and the EnvVar that specifies it" );
88
    ToolsetDefine ( "\n#..    Specify the version of JAVA to use and the EnvVar that specifies it" );
89
    ToolsetDefine ( "#" );
89
    ToolsetDefine ( "#" );
90
    ToolsetDefine ( "JAVA_VER = $version" );
90
    ToolsetDefine ( "JAVA_VER = $version" );
91
    ToolsetDefine ( "JAVA_HOME_VAR = JAVA_HOME_$nice_ver" );
91
    ToolsetDefine ( "JAVA_HOME_VAR = JAVA_HOME_$nice_ver" );
92
    ToolsetDefine ( "\n" );
92
    ToolsetDefine ( "" );
-
 
93
 
-
 
94
#
-
 
95
#   Examine the dependent packages looking for a package that provides
-
 
96
#   'ant' toolset information. If found the provided ANT will be used
-
 
97
#   in place of the default ant
-
 
98
#  
-
 
99
    if (testToolInfo('ant'))
-
 
100
    {
-
 
101
        my $antTool = getToolInfo('ant', 'JAVA_VERSION');
-
 
102
        my $antHome = catdir($antTool->{PKGBASE}, $antTool->{TOOLROOT});
-
 
103
        my $antVersion = $antTool->{PKGENTRY}->getVersion();
-
 
104
 
-
 
105
        # 
-
 
106
        # Validate the required version of Java for the tool
-
 
107
        #   Assume JAVA_VERSION is of the form JAVA_HOME_1_6 and
-
 
108
        #   that we can do a crude string comparison
-
 
109
        # 
-
 
110
        my $javaVersion = $antTool->{JAVA_VERSION};
-
 
111
        if (("JAVA_HOME_$nice_ver" cmp $javaVersion) <= 0 )
-
 
112
        {
-
 
113
            Error ("The version of Java required by the ant package is not suitable",
-
 
114
                   "The ant plugin requires: $javaVersion",
-
 
115
                   "This package is building for: JAVA_HOME_$nice_ver"
-
 
116
                   );
-
 
117
        }
-
 
118
        $ENV{JAVA_HOME}=$ENV{$javaVersion};
-
 
119
 
-
 
120
        ToolsetDefine ( '#..    Specify the ANT_HOME provided by the package' );
-
 
121
        ToolsetDefine ( '#' );
-
 
122
        ToolsetDefine ( "ANT_HOME = $antHome" );
-
 
123
        ToolsetDefine ( "ANT_TITLE=, Ant $antVersion" );
-
 
124
        ToolsetDefine ( '' );
-
 
125
    }
93
 
126
 
94
#.. Toolset specific definitions
127
#.. Toolset specific definitions
95
#
128
#
96
    Init( "java_sdk" );
129
    Init( "java_sdk" );
97
    ToolsetDefines( 'JAVA.DEF' );
130
    ToolsetDefines( 'JAVA.DEF' );
Line 123... Line 156...
123
    #   Generate the recipe to create the project
156
    #   Generate the recipe to create the project
124
    #   Add names of co-generated targets.
157
    #   Add names of co-generated targets.
125
    #
158
    #
126
    $io->Label( "Build project", $name );
159
    $io->Label( "Build project", $name );
127
    $io->Entry( "Project_$name",": $buildxml\n", " \\\n", "" , @{$pGenerated} );
160
    $io->Entry( "Project_$name",": $buildxml\n", " \\\n", "" , @{$pGenerated} );
128
    $io->PrtLn( "\t\$(XX_PRE)grep \'includeAntRuntime[ \t]*=[ \t]*\"off\"\' $buildxml || (echo ANT build file MUST specify includeAntRuntime=\"off\" with each javac command; exit 1)" );
161
    $io->PrtLn( "\t\$(XX_PRE)grep \'includeAntRuntime[ \t]*=[ \t]*\"off\"\' $buildxml || (echo ANT 'build file MUST specify includeAntRuntime=\"off\" with each javac command'; exit 1)" );
129
    $io->PrtLn( "\t\$(XX_PRE)\$(call ProjectDefine_$name,)" );
162
    $io->PrtLn( "\t\$(XX_PRE)\$(call ProjectDefine_$name,)" );
130
    $io->Newline();
163
    $io->Newline();
131
 
164
 
132
    #
165
    #
133
    #   Generate the recipe to clean the project
166
    #   Generate the recipe to clean the project