Subversion Repositories DevTools

Rev

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

Rev 335 Rev 343
Line 63... Line 63...
63
my $opt_runtests = 1;                       # Run unit tests after build
63
my $opt_runtests = 1;                       # Run unit tests after build
64
my $opt_latest_root;                        # Modify config spec with rule (kludge)
64
my $opt_latest_root;                        # Modify config spec with rule (kludge)
65
my $opt_branch;                             # Create config spec with branch
65
my $opt_branch;                             # Create config spec with branch
66
my $opt_debug_build = 0;                    # Build Debug Only
66
my $opt_debug_build = 0;                    # Build Debug Only
67
my $opt_prod_build = 0;                     # Build ion Only
67
my $opt_prod_build = 0;                     # Build ion Only
68
my $opt_view_root = $ENV{'GBE_VIEWBASE'};   # Root of the view
-
 
69
my $opt_config_spec;                        # User provided config spec
68
my $opt_config_spec;                        # User provided config spec
70
my $opt_prefix = 1;                         # Prefix the view tag with user-name
69
my $opt_prefix = 1;                         # Prefix the view tag with user-name
71
my $opt_tag;                                # View tag insert (build or export or user)
70
my $opt_tag;                                # View tag insert (build or export or user)
72
 
71
 
73
#
72
#
74
#   Globals - Provided by the JATS environment
73
#   Globals - Provided by the JATS environment
75
#
74
#
76
my $USER            = $ENV{'USER'};
75
my $USER            = $ENV{'USER'};
77
my $UNIX            = $ENV{'GBE_UNIX'};
76
my $UNIX            = $ENV{'GBE_UNIX'};
78
my $HOME            = $ENV{'HOME'};
-
 
79
my $GBE_SANDBOX     = $ENV{'GBE_SANDBOX'};
77
my $GBE_SANDBOX     = $ENV{'GBE_SANDBOX'};
80
my $GBE_ABT         = $ENV{'GBE_ABT'} || '0';
78
my $GBE_ABT         = $ENV{'GBE_ABT'} || '0';
81
my $MACHINENAME     = $ENV{'GBE_HOSTNAME'};
79
my $MACHINENAME     = $ENV{'GBE_HOSTNAME'};
-
 
80
my $GBE_VIEWBASE    = $ENV{'GBE_VIEWBASE'};   # Root of the view
82
 
81
 
83
#
82
#
84
#   Globals
83
#   Globals
85
#
84
#
86
my $VIEWDIR_ROOT = "c:/clearcase";          # Root of all static views (WIN32)
85
my $VIEWDIR_ROOT;                           # Root of the static view
87
my $VIEWTAG;                                # The view tag
86
my $VIEWTAG;                                # The view tag
88
my $VIEWDIR;                                # Absolute path to the view
87
my $VIEWDIR;                                # Absolute path to the view
89
my $VIEWPATH;                               # Path relative to clearcase
88
my $VIEWPATH;                               # Path relative to clearcase
90
my $user_cwd;
89
my $user_cwd;
91
my $error = 0;
90
my $error = 0;
Line 99... Line 98...
99
 
98
 
100
my $UNIX_VIEW_PREFIX = '/view/';            # Don't know how to determine this value
99
my $UNIX_VIEW_PREFIX = '/view/';            # Don't know how to determine this value
101
my $WIN32_VIEW_PREFIX = 'o:/';              # Don't know how to determine this value
100
my $WIN32_VIEW_PREFIX = 'o:/';              # Don't know how to determine this value
102
my $VIEW_PREFIX = $UNIX ? $UNIX_VIEW_PREFIX : $WIN32_VIEW_PREFIX ;
101
my $VIEW_PREFIX = $UNIX ? $UNIX_VIEW_PREFIX : $WIN32_VIEW_PREFIX ;
103
 
102
 
104
my $UNIX_VP_ROOT    = 'jats_cbuilder';
-
 
105
my $VOB_SEP         = $UNIX ? '/' : '\\';
103
my $VOB_SEP         = $UNIX ? '/' : '\\';
106
my $view_prefix     = "${USER}_";
104
my $view_prefix     = "${USER}_";
107
 
105
 
108
#
106
#
109
#   ROOT_VOBS is a list of VOBS too look in first
107
#   ROOT_VOBS is a list of VOBS too look in first
Line 128... Line 126...
128
#
126
#
129
#   Alter some option defaults if we are creating a view within a sandbox
127
#   Alter some option defaults if we are creating a view within a sandbox
130
#
128
#
131
if ( $GBE_SANDBOX )
129
if ( $GBE_SANDBOX )
132
{
130
{
133
   $opt_view_root = $GBE_SANDBOX;
131
   $GBE_VIEWBASE = $GBE_SANDBOX;
134
   $opt_prefix = 0;
132
   $opt_prefix = 0;
135
   (my $sandbox_name = $GBE_SANDBOX) =~ s~.*/~~ ;
133
   (my $sandbox_name = $GBE_SANDBOX) =~ s~.*/~~ ;
136
   $opt_tag = 'sandbox.'. $sandbox_name unless ( $opt_tag );
134
   $opt_tag = 'sandbox.'. $sandbox_name unless ( $opt_tag );
137
}
135
}
138
 
136
 
Line 166... Line 164...
166
                "latestroot=s"  => \$opt_latest_root,       # String
164
                "latestroot=s"  => \$opt_latest_root,       # String
167
                "branch=s"      => \$opt_branch,            # String
165
                "branch=s"      => \$opt_branch,            # String
168
                "mkbranch=s"    => \$opt_branch,            # String
166
                "mkbranch=s"    => \$opt_branch,            # String
169
                "prodOnly"      => \$opt_prod_build,        # flag
167
                "prodOnly"      => \$opt_prod_build,        # flag
170
                "debugOnly"     => \$opt_debug_build,       # flag
168
                "debugOnly"     => \$opt_debug_build,       # flag
171
                "root=s"        => \$opt_view_root,         # string
169
                "root=s"        => \$GBE_VIEWBASE,          # string
172
                "prefix!"       => \$opt_prefix,            # flag
170
                "prefix!"       => \$opt_prefix,            # flag
173
                "tag=s"         => \$opt_tag,               # string
171
                "tag=s"         => \$opt_tag,               # string
174
                );
172
                );
175
 
173
 
176
                #
174
                #
Line 303... Line 301...
303
Error ("Cannot locate the 'cleartool' utility in the users PATH")
301
Error ("Cannot locate the 'cleartool' utility in the users PATH")
304
    unless ( LocateProgInPath('cleartool', '--All') );
302
    unless ( LocateProgInPath('cleartool', '--All') );
305
    
303
    
306
 
304
 
307
#
305
#
308
#   Under UNIX, create views in the user home directory
306
#   Clean up the view root directory
309
#
307
#
310
unless ( $opt_view_root  )
-
 
311
{
-
 
312
    if ( $UNIX )
-
 
313
    {
-
 
314
        Error ("Unix HOME EnvVar not defined" ) unless ( $HOME );
-
 
315
        Error ("Unix HOME directory not found: $HOME" ) unless (-d $HOME );
-
 
316
        $VIEWDIR_ROOT = "$HOME/$UNIX_VP_ROOT";
-
 
317
        Verbose ("Unix viewpath: $VIEWDIR_ROOT");
-
 
318
        mkdir ( $VIEWDIR_ROOT ) unless (-d $VIEWDIR_ROOT);
-
 
319
    }
-
 
320
}
-
 
321
else
-
 
322
{
-
 
323
    $opt_view_root = Realpath($opt_view_root) || $opt_view_root;
308
$VIEWDIR_ROOT = Realpath($GBE_VIEWBASE) || $GBE_VIEWBASE;
324
    $VIEWDIR_ROOT = $opt_view_root;
-
 
325
}
-
 
326
 
309
 
327
Verbose ("Viewpath: $VIEWDIR_ROOT");
310
Verbose ("Viewpath: $VIEWDIR_ROOT");
328
Error ("Cannot locate view root directory: $VIEWDIR_ROOT" ) unless (-d $VIEWDIR_ROOT);
311
Error ("Cannot locate view root directory: $VIEWDIR_ROOT" ) unless (-d $VIEWDIR_ROOT);
329
 
312
 
330
#
313
#
Line 1487... Line 1470...
1487
jats-lib (cr) package. The version of the packages will not be considered.
1470
jats-lib (cr) package. The version of the packages will not be considered.
1488
 
1471
 
1489
=item B<-root=xxx>
1472
=item B<-root=xxx>
1490
 
1473
 
1491
This option allows the location of the generated view to be specified on the
1474
This option allows the location of the generated view to be specified on the
1492
command line. The environment variable GBE_VIEWBASE provides the same feature,
1475
command line. It overides the value of GBE_VIEWBASE.
1493
but it will affect all the view created.
-
 
1494
 
-
 
1495
The default location is:
-
 
1496
 
-
 
1497
=over 8
-
 
1498
 
-
 
1499
=item WINDOWS
-
 
1500
 
-
 
1501
c:\clearcase
-
 
1502
 
-
 
1503
=item Unix
-
 
1504
 
-
 
1505
$(HOME)/jats_cbuilder
-
 
1506
 
1476
 
1507
If the comamnd is invoked within a development sandbox, then the default
1477
If the comamnd is invoked within a development sandbox, then the default
1508
location will be the root directory of the development sandbox.
1478
location will be the root directory of the development sandbox.
1509
 
1479
 
1510
=back
1480
=back