| Line 1... |
Line 1... |
| 1 |
#! perl
|
1 |
#! perl
|
| 2 |
########################################################################
|
2 |
########################################################################
|
| 3 |
# Copyright (C) 1998-2010 ERG Limited, All rights reserved
|
3 |
# Copyright (C) 1998-2012 VIX Limited, All rights reserved
|
| 4 |
#
|
4 |
#
|
| 5 |
# Module name : jats.sh
|
5 |
# Module name : jats.sh
|
| 6 |
# Module type : Makefile system
|
6 |
# Module type : Makefile system
|
| 7 |
# Compiler(s) : n/a
|
7 |
# Compiler(s) : n/a
|
| 8 |
# Environment(s): jats
|
8 |
# Environment(s): jats
|
| Line 34... |
Line 34... |
| 34 |
use DescPkg; # Package Descriptor processing
|
34 |
use DescPkg; # Package Descriptor processing
|
| 35 |
use JatsSystem; # System call interface
|
35 |
use JatsSystem; # System call interface
|
| 36 |
use JatsBuildFiles; # Parse Build Files
|
36 |
use JatsBuildFiles; # Parse Build Files
|
| 37 |
|
37 |
|
| 38 |
my $GBE_VERSION = "VERSION_TAG"; # Will be re-written when released
|
38 |
my $GBE_VERSION = "VERSION_TAG"; # Will be re-written when released
|
| 39 |
my $GBE_NOT_RELEASED = "RELEASE_TAG"; # Will be re-written when released
|
39 |
my $GBE_NOT_RELEASED = "RELEASE_TAG"; # Will be re-written (to empty) when released
|
| 40 |
my $opr_done;
|
40 |
my $opr_done;
|
| 41 |
my $opt_here = 0;
|
41 |
my $opt_here = 0;
|
| 42 |
my $BUILD_FILE = "build.pl";
|
42 |
my $BUILD_FILE = "build.pl";
|
| 43 |
my @BUILD_FILE_ALT = qw(auto.pl build_test.pl);
|
43 |
my @BUILD_FILE_ALT = qw(auto.pl build_test.pl);
|
| 44 |
my $BUILD_FILE_SET;
|
44 |
my $BUILD_FILE_SET;
|
| Line 87... |
Line 87... |
| 87 |
our $PERL5LIB = $ENV{'PERL5LIB'} || '';
|
87 |
our $PERL5LIB = $ENV{'PERL5LIB'} || '';
|
| 88 |
our $JAVA_HOME = $ENV{'JAVA_HOME'} || '';
|
88 |
our $JAVA_HOME = $ENV{'JAVA_HOME'} || '';
|
| 89 |
our $GBE_ABT = $ENV{'GBE_ABT'} || '';
|
89 |
our $GBE_ABT = $ENV{'GBE_ABT'} || '';
|
| 90 |
our $GBE_VIEWBASE = $ENV{'GBE_VIEWBASE'} || '';
|
90 |
our $GBE_VIEWBASE = $ENV{'GBE_VIEWBASE'} || '';
|
| 91 |
our $GBE_VCS = $ENV{'GBE_VCS'} || 'CC';
|
91 |
our $GBE_VCS = $ENV{'GBE_VCS'} || 'CC';
|
| 92 |
our $GBE_UNIX = 1;
|
92 |
our $GBE_UNIX = $^O ne "MSWin32" ;
|
| 93 |
our $CWD;
|
93 |
our $CWD;
|
| 94 |
|
94 |
|
| 95 |
#-------------------------------------------------------------------------------
|
95 |
#-------------------------------------------------------------------------------
|
| 96 |
# Clean up some environment variables
|
96 |
# Clean up some environment variables
|
| 97 |
# GBE_BUILDFILTER - may be space or comma separated list
|
97 |
# GBE_BUILDFILTER - may be space or comma separated list
|
| Line 221... |
Line 221... |
| 221 |
Warning ("Perl Version may not be compatible",
|
221 |
Warning ("Perl Version may not be compatible",
|
| 222 |
"Jats has been tested with: 5.8.8",
|
222 |
"Jats has been tested with: 5.8.8",
|
| 223 |
"This version is: $]",
|
223 |
"This version is: $]",
|
| 224 |
) if ( $] > 5.010000 );
|
224 |
) if ( $] > 5.010000 );
|
| 225 |
|
225 |
|
| 226 |
Warning ("The PDK, as used by some deployed packages does not work with this version of perl.",
|
226 |
Warning ("The PDK, as used by some deployed packages does not work with",
|
| - |
|
227 |
"this version of perl. VIX only has a licence for PDK V5 and",
|
| 227 |
"ERG only has a licence for PDK V5 and this only works with Perl 5.6 and 5.8",
|
228 |
"this only works with Perl 5.6 and 5.8.",
|
| 228 |
"This version is: $]",
|
229 |
"This version is: $]",
|
| 229 |
) if ( $] > 5.009000 );
|
230 |
) if ( $] > 5.009000 );
|
| 230 |
}
|
231 |
}
|
| 231 |
|
232 |
|
| 232 |
#
|
233 |
#
|
| Line 248... |
Line 249... |
| 248 |
#
|
249 |
#
|
| 249 |
# Warn if this version of JATS is not correctly versioned
|
250 |
# Warn if this version of JATS is not correctly versioned
|
| 250 |
# Users should be using correctly versioned copies of JATS. These come
|
251 |
# Users should be using correctly versioned copies of JATS. These come
|
| 251 |
# from dpkg_archive.
|
252 |
# from dpkg_archive.
|
| 252 |
#
|
253 |
#
|
| 253 |
Warning ("*** Unofficial version of JATS ***")
|
254 |
# Display warnings at the end of the run
|
| - |
|
255 |
# This is an attempt to make them visible to the user
|
| - |
|
256 |
#
|
| - |
|
257 |
my @endWarnings;
|
| 254 |
if ( ! $GBE_JATS_SANE && $GBE_NOT_RELEASED );
|
258 |
if ( ! $GBE_JATS_SANE && $GBE_NOT_RELEASED ) {
|
| - |
|
259 |
@endWarnings = ( "*** Unofficial version of JATS ***");
|
| - |
|
260 |
} else {
|
| - |
|
261 |
|
| - |
|
262 |
#
|
| - |
|
263 |
# Windows only
|
| - |
|
264 |
# Attempt to detect JATS no being run via the jats2_current link
|
| - |
|
265 |
#
|
| - |
|
266 |
unless ( $GBE_UNIX || $GBE_JATS_SANE || $GBE_ABT || $GBE_CORE =~ m~core_devl/jats2_current~ ) {
|
| - |
|
267 |
@endWarnings =
|
| - |
|
268 |
("***",
|
| - |
|
269 |
"*** Jats is being invoked from a batch file that does not ",
|
| - |
|
270 |
"*** automatically track the latest version. Update jats.bat",
|
| - |
|
271 |
"*** so that GBE_CORE references core_devl/jats2_current",
|
| - |
|
272 |
"***"
|
| - |
|
273 |
);
|
| - |
|
274 |
}
|
| - |
|
275 |
}
|
| - |
|
276 |
|
| - |
|
277 |
#-------------------------------------------------------------------------------
|
| - |
|
278 |
# Function : END
|
| - |
|
279 |
#
|
| - |
|
280 |
# Description : Display user warnings at the end of the processing
|
| - |
|
281 |
#
|
| - |
|
282 |
# Inputs : global: @endWarnings
|
| - |
|
283 |
#
|
| - |
|
284 |
END
|
| - |
|
285 |
{
|
| - |
|
286 |
Message (@endWarnings)
|
| - |
|
287 |
if ( @endWarnings );
|
| - |
|
288 |
}
|
| 255 |
|
289 |
|
| 256 |
################################################################################
|
290 |
################################################################################
|
| 257 |
# If running with cygwin then warn if the CYGWIN environment variable
|
291 |
# If running with cygwin then warn if the CYGWIN environment variable
|
| 258 |
# contains "tty". tty mode causes some strange behaviour such as:
|
292 |
# contains "tty". tty mode causes some strange behaviour such as:
|
| 259 |
# 1) Non flushing of perl scripts under some conditions (eg:create_dpkg)
|
293 |
# 1) Non flushing of perl scripts under some conditions (eg:create_dpkg)
|
| Line 1776... |
Line 1810... |
| 1776 |
|
1810 |
|
| 1777 |
#-------------------------------------------------------------------------------
|
1811 |
#-------------------------------------------------------------------------------
|
| 1778 |
# Function : run_ant
|
1812 |
# Function : run_ant
|
| 1779 |
#
|
1813 |
#
|
| 1780 |
# Description : Invoke ant
|
1814 |
# Description : Invoke ant
|
| 1781 |
# If the current directory looks like an ERG build system, then
|
1815 |
# If the current directory looks like an VIX build system, then
|
| 1782 |
# create and maintain an auto.xml file. Otherwise simply invoke ant
|
1816 |
# create and maintain an auto.xml file. Otherwise simply invoke ant
|
| 1783 |
#
|
1817 |
#
|
| 1784 |
# Inputs : $1+ program arguments
|
1818 |
# Inputs : $1+ program arguments
|
| 1785 |
#
|
1819 |
#
|
| 1786 |
sub run_ant
|
1820 |
sub run_ant
|
| 1787 |
{
|
1821 |
{
|
| 1788 |
my $JAVA_HOME = $ENV{JAVA_HOME} || Error ("JAVA_HOME is not defined in the environment");
|
1822 |
my $JAVA_HOME = $ENV{JAVA_HOME} || Error ("JAVA_HOME is not defined in the environment");
|
| 1789 |
my $ANT_HOME = $ENV{ANT_HOME} || Error ("ANT_HOME is not defined in the environment" );
|
1823 |
my $ANT_HOME = $ENV{ANT_HOME} || Error ("ANT_HOME is not defined in the environment" );
|
| 1790 |
|
1824 |
|
| 1791 |
#
|
1825 |
#
|
| 1792 |
# Detect an ERG formatted build
|
1826 |
# Detect an VIX formatted build
|
| 1793 |
# This will have two files <projectname>.xml and <projectname>depends.xml
|
1827 |
# This will have two files <projectname>.xml and <projectname>depends.xml
|
| 1794 |
# Create the 'auto.xml' file only if its not present
|
1828 |
# Create the 'auto.xml' file only if its not present
|
| 1795 |
#
|
1829 |
#
|
| 1796 |
my @ant_arg;
|
1830 |
my @ant_arg;
|
| 1797 |
my @flist;
|
1831 |
my @flist;
|