Subversion Repositories DevTools

Rev

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

Rev 349 Rev 361
Line 86... Line 86...
86
our $USER               = $ENV{'USER'}               || '';
86
our $USER               = $ENV{'USER'}               || '';
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_UNIX           = 1;
92
our $GBE_UNIX           = 1;
92
our $CWD;
93
our $CWD;
93
 
94
 
94
#-------------------------------------------------------------------------------
95
#-------------------------------------------------------------------------------
95
#   Clean up some environment variables
96
#   Clean up some environment variables
96
#       GBE_BUILDFILTER - may be space or comma separated list
97
#       GBE_BUILDFILTER - may be space or comma separated list
97
#       GBE_PLATFORM - may be space or comma separated list
98
#       GBE_PLATFORM - may be space or comma separated list
98
#       GBE_ABT - may be space or comma separated list
99
#       GBE_ABT - may be space or comma separated list
99
#       GBE_HOSTNAME - No whitespace
100
#       GBE_HOSTNAME - No whitespace
-
 
101
#       GBE_VCS - lowercase to match command ccrelease and others
100
#
102
#
101
$GBE_BUILDFILTER = join (' ', split( /[,\s]+/, $GBE_BUILDFILTER));
103
$GBE_BUILDFILTER = join (' ', split( /[,\s]+/, $GBE_BUILDFILTER));
102
$GBE_PLATFORM    = join (' ', split( /[,\s]+/, $GBE_PLATFORM));
104
$GBE_PLATFORM    = join (' ', split( /[,\s]+/, $GBE_PLATFORM));
103
$GBE_ABT         = join (' ', split( /[,\s]+/, $GBE_ABT));
105
$GBE_ABT         = join (' ', split( /[,\s]+/, $GBE_ABT));
104
$GBE_HOSTNAME    =~ s~\s+~~g;
106
$GBE_HOSTNAME    =~ s~\s+~~g;
-
 
107
$GBE_VCS         = lc( $GBE_VCS );
105
 
108
 
106
#-------------------------------------------------------------------------------
109
#-------------------------------------------------------------------------------
107
#   Parse the user options
110
#   Parse the user options
108
#   GetOptions has been configured so that it will stop parsing on the first
111
#   GetOptions has been configured so that it will stop parsing on the first
109
#   non-options. This allows the command syntax to the script to have options
112
#   non-options. This allows the command syntax to the script to have options
Line 979... Line 982...
979
$ENV{'GBE_UNIX'}          = $GBE_UNIX;
982
$ENV{'GBE_UNIX'}          = $GBE_UNIX;
980
$ENV{'USER'}              = $USER;
983
$ENV{'USER'}              = $USER;
981
$ENV{'COMSPEC'}           = $COMSPEC;
984
$ENV{'COMSPEC'}           = $COMSPEC;
982
$ENV{'GBE_HOSTNAME'}      = $GBE_HOSTNAME;
985
$ENV{'GBE_HOSTNAME'}      = $GBE_HOSTNAME;
983
$ENV{'GBE_VIEWBASE'}      = $GBE_VIEWBASE;
986
$ENV{'GBE_VIEWBASE'}      = $GBE_VIEWBASE;
-
 
987
$ENV{'GBE_VCS'}           = $GBE_VCS;
984
 
988
 
985
#-------------------------------------------------------------------------------
989
#-------------------------------------------------------------------------------
986
# Function        : PathPrepend
990
# Function        : PathPrepend
987
#
991
#
988
# Description     : Prepend stuff to the PATH
992
# Description     : Prepend stuff to the PATH
Line 2056... Line 2060...
2056
run_ant (@ARGV)                         if ( $cmd =~ m/^ant$/ );
2060
run_ant (@ARGV)                         if ( $cmd =~ m/^ant$/ );
2057
run_abt (@ARGV)                         if ( $cmd =~ m/^abt$/ );
2061
run_abt (@ARGV)                         if ( $cmd =~ m/^abt$/ );
2058
 
2062
 
2059
etool ('cache_dpkg', @ARGV)                         if ( $cmd =~ m/^dpkg/ );
2063
etool ('cache_dpkg', @ARGV)                         if ( $cmd =~ m/^dpkg/ );
2060
etool ('gen_msprojects', @ARGV)                     if ( $cmd =~ m/^gen_msproject/ );
2064
etool ('gen_msprojects', @ARGV)                     if ( $cmd =~ m/^gen_msproject/ );
2061
etool ('jats_ccrelease.pl', @ARGV)                  if ( $cmd =~ m/^cbuild/ );
-
 
2062
etool ('jats_ccrelease.pl', @ARGV)                  if ( $cmd =~ m/^release/ );
2065
etool ("jats_${GBE_VCS}release.pl", @ARGV)                  if ( $cmd =~ m/^release/ );
2063
etool ('jats_ccrelease.pl', '-extractfiles' ,@ARGV) if ( $cmd =~ m/^extractf/ );
2066
etool ("jats_${GBE_VCS}release.pl", '-extractfiles' ,@ARGV) if ( $cmd =~ m/^extractf/ );
2064
etool ('jats_ccrelease.pl', '-extract' ,@ARGV)      if (!$opr_done && $cmd =~ m/^extract/ );
2067
etool ("jats_${GBE_VCS}release.pl", '-extract' ,@ARGV)      if (!$opr_done && $cmd =~ m/^extract/ );
2065
etool ('jats_label', @ARGV)                         if ( $cmd =~ m/^label$/ );
2068
etool ("jats_${GBE_VCS}label", @ARGV)                       if ( $cmd =~ m/^label$/ );
2066
etool ('jats_sandbox', @ARGV)                       if ( $cmd =~ m/^sandbox$/ );
2069
etool ('jats_sandbox', @ARGV)                       if ( $cmd =~ m/^sandbox$/ );
2067
etool ('jats_help', @ARGV)                          if ( $cmd =~ m/^help$/ );
2070
etool ('jats_help', @ARGV)                          if ( $cmd =~ m/^help$/ );
2068
etool ('jats_help', '-man', @ARGV)                  if ( $cmd =~ m/^man$/ );
2071
etool ('jats_help', '-man', @ARGV)                  if ( $cmd =~ m/^man$/ );
2069
etool ('jats_vars.pl', @ARGV)                       if ( $cmd =~ m/^var/ );
2072
etool ('jats_vars.pl', @ARGV)                       if ( $cmd =~ m/^var/ );
2070
 
2073
 
Line 2077... Line 2080...
2077
#   Documentation
2080
#   Documentation
2078
#
2081
#
2079
 
2082
 
2080
=pod
2083
=pod
2081
 
2084
 
-
 
2085
=for htmltoc    CORE::AA::Jats
-
 
2086
 
2082
=head1 NAME
2087
=head1 NAME
2083
 
2088
 
2084
jats - JATS utility interface tool
2089
jats - JATS utility interface tool
2085
 
2090
 
2086
=head1 SYNOPSIS
2091
=head1 SYNOPSIS
Line 2120... Line 2125...
2120
    label               - Labelling functions
2125
    label               - Labelling functions
2121
    release             - Build a release from a clearcase label
2126
    release             - Build a release from a clearcase label
2122
    extract             - Extract a release from a clearcase label
2127
    extract             - Extract a release from a clearcase label
2123
    dpkg_cache          - Maintain a dpkg cache
2128
    dpkg_cache          - Maintain a dpkg cache
2124
    gen_msproject       - Generate MSVC project files
2129
    gen_msproject       - Generate MSVC project files
2125
    sandbox             - Run Sanbox utility
2130
    sandbox             - Run Sandbox utility
2126
 
2131
 
2127
    etool name          - Run internal tool
2132
    etool name          - Run internal tool
2128
    eprog name          - Run external tool
2133
    eprog name          - Run external tool
2129
    ebin name           - Run JATS binary tool
2134
    ebin name           - Run JATS binary tool
2130
 
2135
 
Line 2155... Line 2160...
2155
=item B<-man[=n]>
2160
=item B<-man[=n]>
2156
 
2161
 
2157
Prints the manual page and exits.
2162
Prints the manual page and exits.
2158
 
2163
 
2159
If a numeric manual level is provide then it will be used to control the
2164
If a numeric manual level is provide then it will be used to control the
2160
verbosity of help provided. This should be inthe range of 1 to 3.
2165
verbosity of help provided. This should be in the range of 1 to 3.
2161
 
2166
 
2162
=item B<-b file> B<-buildfile file>
2167
=item B<-b file> B<-buildfile file>
2163
 
2168
 
2164
This option modifies the operation of the "build" command. The command will
2169
This option modifies the operation of the "build" command. The command will
2165
use the specified file instead of the normal build.pl file.
2170
use the specified file instead of the normal build.pl file.
Line 2218... Line 2223...
2218
This option is similar to the B<-locate> option, but it allows the required
2223
This option is similar to the B<-locate> option, but it allows the required
2219
build files to be located by ensuring that the required buildfile builds the
2224
build files to be located by ensuring that the required buildfile builds the
2220
specified package.
2225
specified package.
2221
 
2226
 
2222
There are two forms in which the B<packagename> can be specified. It can be
2227
There are two forms in which the B<packagename> can be specified. It can be
2223
specified as a full package name and vesrion, or as a package name and the
2228
specified as a full package name and version, or as a package name and the
2224
project suffix. ie: jats-api.1.0.0000.cr or jats-api.cr
2229
project suffix. ie: jats-api.1.0.0000.cr or jats-api.cr
2225
 
2230
 
2226
=item B<-locatefile=file>
2231
=item B<-locatefile=file>
2227
 
2232
 
2228
This option is similar to the B<-locate> option, but it allows the name of the
2233
This option is similar to the B<-locate> option, but it allows the name of the
Line 2291... Line 2296...
2291
JATS will attempt to transfer the target version to the local cache in an
2296
JATS will attempt to transfer the target version to the local cache in an
2292
attempt to improve performance.
2297
attempt to improve performance.
2293
 
2298
 
2294
=item B<-[no]exportvars>
2299
=item B<-[no]exportvars>
2295
 
2300
 
2296
The default operation is to export sanitised and calculated values to the
2301
The default operation is to export sanitized and calculated values to the
2297
programs running under JATS. The use of NoExportVars will prevent JATS from
2302
programs running under JATS. The use of NoExportVars will prevent JATS from
2298
exporting modified EnvVars into the environment. This may be required by
2303
exporting modified EnvVars into the environment. This may be required by
2299
processes, such as the build daemons that need to pick up the current version of
2304
processes, such as the build daemons that need to pick up the current version of
2300
JATS on the fly and not have it fixed when the daemon is started.
2305
JATS on the fly and not have it fixed when the daemon is started.
2301
 
2306
 
Line 2308... Line 2313...
2308
The following commands are invoked directly by the JATS script to wrap the build
2313
The following commands are invoked directly by the JATS script to wrap the build
2309
tools in a controlled manner.
2314
tools in a controlled manner.
2310
 
2315
 
2311
=over 8
2316
=over 8
2312
 
2317
 
2313
=item B<build>
2318
=item L<build|TOOLS::buildlib>
2314
 
2319
 
2315
Build or rebuild the sandbox and makefiles.
2320
Build or rebuild the sandbox and makefiles.
2316
 
2321
 
2317
This command must be used before the component can be "made" and when the
2322
This command must be used before the component can be "made" and when the
2318
contents of the "buildpl" file change. It is a common mistake to use the "build"
2323
contents of the "buildpl" file change. It is a common mistake to use the "build"
2319
command to much.
2324
command to much.
2320
 
2325
 
2321
The script will hunt for a suitable build.pl file before running the build and
2326
The script will hunt for a suitable build.pl file before running the build and
2322
make subcommands.
2327
make subcommands.
2323
 
2328
 
2324
The build process has a large number of options. Use "JATS build help" to
2329
The build process has a large number of options.
2325
display the complete list.
2330
Use L<"JATS build help"|TOOLS::buildlib/"item_help"> to display the complete list.
2326
 
2331
 
2327
=item B<make>
2332
=item L<make|TOOLS::jmake>
2328
 
2333
 
2329
Make one or more components
2334
Make one or more components
2330
 
2335
 
2331
This command will invoke a suitable "make" program on the makefile found in
2336
This command will invoke a suitable "make" program on the makefile found in
2332
the current directory. This makefile should have been generated by JATS.
2337
the current directory. This makefile should have been generated by JATS.
2333
 
2338
 
2334
The make process has a large number of options. Use "JATS make help" to
2339
The make process has a large number of options. Use
2335
display the complete list.
2340
L<"JATS make help"|TOOLS::jmake/"item_help">" to display the complete list.
2336
 
2341
 
2337
=item B<ant>
2342
=item B<ant>
2338
 
2343
 
2339
This command will use ANT to build a component. JATS will determine the
2344
This command will use ANT to build a component. JATS will determine the
2340
build.xml file to use with the following algorithm.
2345
build.xml file to use with the following algorithm.
Line 2356... Line 2361...
2356
 
2361
 
2357
This command is used to invoke the Auto Build Tool. It will invoke ANT on the
2362
This command is used to invoke the Auto Build Tool. It will invoke ANT on the
2358
build.xml file in the current directory in such  manner as to not affect the
2363
build.xml file in the current directory in such  manner as to not affect the
2359
environment of the programs running under ANT.
2364
environment of the programs running under ANT.
2360
 
2365
 
2361
The remained of the command line is passed to the ABT, with the exception of
2366
The remainder of the command line is passed to the ABT, with the exception of
2362
the options:
2367
the options:
2363
 
2368
 
2364
=over 8
2369
=over 8
2365
 
2370
 
-
 
2371
=item *
-
 
2372
 
2366
=item * -java=x.x. This is used to control the version of Java used by the
2373
-java=x.x. This is used to control the version of Java used by the
2367
ABT. The default is 1.6.
2374
ABT. The default is 1.6.
2368
 
2375
 
-
 
2376
=item *
-
 
2377
 
2369
=item * -buildfile=name. This is used to provide a different build file to ant.
2378
-buildfile=name. This is used to provide a different build file to ant.
2370
The default build file is 'build.xml'.
2379
The default build file is 'build.xml'.
2371
 
2380
 
2372
=back
2381
=back
2373
 
2382
 
2374
=item B<install>
-
 
2375
 
-
 
2376
This command will install a generated "package" into the local_dpkg_archive
-
 
2377
directory. This allows a group of packages to be tested before being published
-
 
2378
into the global dpkg_archive.
-
 
2379
 
-
 
2380
NOTE. This command is no longer needed. The "build" process will place a
-
 
2381
shortcut in the local_dpkg_archive to a components "pkg" directory. Other
-
 
2382
components will utilize this shortcut directly and pickup the package without
-
 
2383
the user needing to "install" the package - a step that can be forgotten.
-
 
2384
 
-
 
2385
=item B<help>
2383
=item L<help|TOOLS::jats_help>
2386
 
2384
 
2387
Display the basic help message.
2385
Display the basic help message.
2388
 
2386
 
2389
=item B<vars [-v]>
2387
=item L<vars [-v]|TOOLS::jats_vars>
2390
 
2388
 
2391
This command will display all the JATS related environment variables in a
2389
This command will display all the JATS related environment variables in a
2392
readable form.
2390
readable form.
2393
 
2391
 
2394
Additional information will be displayed if an argument of "-v" is provided.
2392
Additional information will be displayed if an argument of "-v" is provided.
Line 2401... Line 2399...
2401
the build environment. They are implemented as extensions to the basic JATS
2399
the build environment. They are implemented as extensions to the basic JATS
2402
command scripts.
2400
command scripts.
2403
 
2401
 
2404
=over 8
2402
=over 8
2405
 
2403
 
2406
=item B<create_dpkg>
2404
=item L<create_dpkg|TOOLS::create_dpkg>
2407
 
2405
 
2408
This command will install a generated package into main dpkg_archive. This
2406
This command will install a generated package into main dpkg_archive. This
2409
command should not be used directly by a user as it does not ensure that package
2407
command should not be used directly by a user as it does not ensure that package
2410
has been created in a repeatable manner - use "jats release".
2408
has been created in a repeatable manner - use "jats release".
2411
 
2409
 
2412
=item B<label>
2410
=item label
2413
 
2411
 
2414
This command provides a number of useful labelling mechanisms to assist in the
2412
This command provides a number of useful labelling mechanisms to assist in the
2415
labeling of source code.
2413
labeling of source code.
2416
 
2414
 
-
 
2415
The command will determine the default Version Control System and invoke the VCS
-
 
2416
specific utility. This will be one of:
-
 
2417
 
-
 
2418
=over 4
-
 
2419
 
-
 
2420
=item   *
-
 
2421
 
-
 
2422
ClearCase: L<cclabel|TOOLS::jats_cclabel>
-
 
2423
 
-
 
2424
=item   *
-
 
2425
 
-
 
2426
Subversion: L<svnlabel|TOOLS::jats_svnlabel>
-
 
2427
 
-
 
2428
=back
-
 
2429
 
2417
=item B<release>, B<cbuild>
2430
=item release
2418
 
2431
 
2419
This command allows a package to be built and released, given a Clearcase label.
2432
This command allows a package to be built and released, given a label.
2420
This is the desired release mechanism.
2433
This is the desired release mechanism for manually releasing a package.
2421
 
2434
 
2422
The command has two main uses:
2435
The command has two main uses:
2423
 
2436
 
2424
=over 8
2437
=over 4
2425
 
2438
 
2426
=item 1
2439
=item 1
2427
 
2440
 
2428
Build a package for release. The process will ensure that the build is
2441
Build a package for release. The process will ensure that the build is
2429
controlled and repeatable.
2442
controlled and repeatable.
Line 2432... Line 2445...
2432
 
2445
 
2433
Rebuild a package for test or debugging purposes.
2446
Rebuild a package for test or debugging purposes.
2434
 
2447
 
2435
=back
2448
=back
2436
 
2449
 
-
 
2450
The command will determine the default Version Control System and invoke the VCS
-
 
2451
specific utility. This will be one of:
-
 
2452
 
-
 
2453
=over 4
-
 
2454
 
-
 
2455
=item   *
-
 
2456
 
-
 
2457
ClearCase: L<ccrelease|TOOLS::jats_ccrelease>
-
 
2458
 
-
 
2459
=item   *
-
 
2460
 
-
 
2461
Subversion: L<svnrelease|TOOLS::jats_svnrelease>
-
 
2462
 
-
 
2463
=back
-
 
2464
 
2437
=item B<extract>
2465
=item L<extract|/"release">
2438
 
2466
 
2439
This is the same as "release -extract"
2467
This is the same as "release -extract"
2440
 
2468
 
2441
 
2469
 
2442
=item B<dpkg_cache>
2470
=item L<dpkg_cache|TOOLS::cache_dpkg>
2443
 
2471
 
2444
This utility provides a number of commands to maintain the local cache of
2472
This utility provides a number of commands to maintain the local cache of
2445
dpkg_archive.
2473
dpkg_archive.
2446
 
2474
 
2447
=item B<gen_msproject>
2475
=item L<gen_msproject|TOOLS::gen_msprojects>
2448
 
2476
 
2449
This utility will generate a set of Microsoft Studio (Version 6) project and
2477
This utility will generate a set of Microsoft Studio (Version 6) project and
2450
workspace files to encapsulate the JATS build. The resultant project allows VS
2478
workspace files to encapsulate the JATS build. The resultant project allows
2451
to be used as an editor, source browser, debugger and build tool. JATS is
2479
Visual Studio to be used as an editor, source browser, debugger and build tool.
2452
still used to perform the build.
2480
JATS is still used to perform the build.
-
 
2481
 
-
 
2482
=item B<install>
-
 
2483
 
-
 
2484
This command will install a generated "package" into the local_dpkg_archive
-
 
2485
directory. This allows a group of packages to be tested before being published
-
 
2486
into the global dpkg_archive.
-
 
2487
 
-
 
2488
=for htmlclass Note
-
 
2489
 
-
 
2490
Note. This command is no longer needed. The "build" process will place a
-
 
2491
shortcut in the local_dpkg_archive to a components "pkg" directory. Other
-
 
2492
components will utilize this shortcut directly and pickup the package without
-
 
2493
the user needing to "install" the package - a step that can be forgotten.
2453
 
2494
 
2454
=item B<etool name>
2495
=item B<etool name>
2455
 
2496
 
2456
This command allows any JATS extension program to be run. The programs will by
2497
This command allows any JATS extension program to be run. The programs will by
2457
found in the JATS TOOLS directory.
2498
found in the JATS TOOLS directory.
Line 2542... Line 2583...
2542
 
2583
 
2543
=head1 DESCRIPTION
2584
=head1 DESCRIPTION
2544
 
2585
 
2545
JATS is a wrapper script. It provides:
2586
JATS is a wrapper script. It provides:
2546
 
2587
 
2547
=over 8
2588
=over 4
2548
 
2589
 
2549
=item *
2590
=item *
2550
 
2591
 
2551
A controlled and sanitised environment to all the build tools.
2592
A controlled and sanitized environment to all the build tools.
2552
 
2593
 
2553
=item *
2594
=item *
2554
 
2595
 
2555
The same command interface on all supported machines: Windows, Solaris and
2596
The same command interface on all supported machines: Windows, Solaris and
2556
Linux.
2597
Linux.
Line 2561... Line 2602...
2561
 
2602
 
2562
=back
2603
=back
2563
 
2604
 
2564
=head1 RELATED DOCUMENTATION
2605
=head1 RELATED DOCUMENTATION
2565
 
2606
 
2566
=over 0
2607
=over 4
2567
 
2608
 
2568
=item   * InstallationNotes
2609
=item   * L<Installation Notes|POD::InstallationNotes>
2569
 
2610
 
2570
=item   * OverView
2611
=item   * L<OverView|POD::OverView>
2571
 
2612
 
2572
=item   * EnvVars
2613
=item   * L<EnvVars|POD::EnvVars>
2573
 
2614
 
2574
=item   * PkgArchives
2615
=item   * L<PkgArchives|POD::PkgArchives>
2575
 
2616
 
2576
=back
2617
=back
2577
 
2618
 
2578
Use C<jats help> to see the available internal documentation.
2619
Use L<jats help|TOOLS::jats_help> to see the available internal documentation.
2579
 
2620
 
2580
=head1 EXAMPLES
2621
=head1 EXAMPLES
2581
 
2622
 
2582
=over 8
2623
=over 8
2583
 
2624
 
2584
=item   JATS help
2625
=item   L<JATS help|TOOLS::jats_help>
2585
 
2626
 
2586
This will display the available internal documentation.
2627
This will display the available internal documentation.
2587
 
2628
 
2588
=item   JATS build
2629
=item   L<JATS build|TOOLS::buildlib>
2589
 
2630
 
2590
This will prime the current package being built ready for "make". The command
2631
This will prime the current package being built ready for "make". The command
2591
will locate the build.pl file and process it. This will locate all the external
2632
will locate the build.pl file and process it. This will locate all the external
2592
packages and generate the required makefiles.
2633
packages and generate the required makefiles.
2593
 
2634
 
2594
=item   JATS make
2635
=item   L<JATS make|TOOLS::jmake>
2595
 
2636
 
2596
This will run the GNU make program over the makefiles generated by the "build"
2637
This will run the GNU make program over the makefiles generated by the "build"
2597
command. This may be executed in a subdirectory in order to limit the targets
2638
command. This may be executed in a subdirectory in order to limit the targets
2598
that are "made".
2639
that are "made".
2599
 
2640
 
-
 
2641
=for htmlclass Note
-
 
2642
 
2600
B<NOTE:> Do not run "make" without using the JATS wrapper. It will not perform
2643
B<NOTE:> Do not run "make" without using the JATS wrapper. It will not perform
2601
as expected as the environment will not have been set up correctly.
2644
as expected as the environment will not have been set up correctly.
2602
 
2645
 
2603
=back
2646
=back
2604
 
2647