Subversion Repositories DevTools

Rev

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

Rev 341 Rev 343
Line 73... Line 73...
73
#
73
#
74
#   Globals - Provided by the JATS environment
74
#   Globals - Provided by the JATS environment
75
#
75
#
76
my $USER            = $ENV{'USER'};
76
my $USER            = $ENV{'USER'};
77
my $UNIX            = $ENV{'GBE_UNIX'};
77
my $UNIX            = $ENV{'GBE_UNIX'};
78
my $HOME            = $ENV{'HOME'};
-
 
79
my $GBE_SANDBOX     = $ENV{'GBE_SANDBOX'};
78
my $GBE_SANDBOX     = $ENV{'GBE_SANDBOX'};
80
my $GBE_ABT         = $ENV{'GBE_ABT'} || '0';
79
my $GBE_ABT         = $ENV{'GBE_ABT'} || '0';
81
my $MACHINENAME     = $ENV{'GBE_HOSTNAME'};
80
my $MACHINENAME     = $ENV{'GBE_HOSTNAME'};
-
 
81
my $GBE_VIEWBASE    = $ENV{'GBE_VIEWBASE'};   # Root of the view
82
 
82
 
83
#
83
#
84
#   Globals
84
#   Globals
85
#
85
#
86
my $VIEWDIR_ROOT = "c:/clearcase";          # Root of all static views (WIN32)
86
my $VIEWDIR_ROOT;                           # Root of the static view
87
my $VIEWDIR;                                # Absolute path to the view
87
my $VIEWDIR;                                # Absolute path to the view
88
my $VIEWPATH;                               # Path relative to clearcase
88
my $VIEWPATH;                               # Path relative to clearcase
89
my $user_cwd;
89
my $user_cwd;
90
my $error = 0;
90
my $error = 0;
91
my $label_count = 0;                        # Number of labels to create the view
91
my $label_count = 0;                        # Number of labels to create the view
92
my @label_not_pegged;                       # List of unpegged labels
92
my @label_not_pegged;                       # List of unpegged labels
93
 
93
 
94
my $UNIX_VP_ROOT    = 'jats_cbuilder';
-
 
95
my $view_prefix     = "${USER}_";
94
my $view_prefix     = "${USER}_";
96
 
95
 
97
#-------------------------------------------------------------------------------
96
#-------------------------------------------------------------------------------
98
# Function        : Mainline Entry Point
97
# Function        : Mainline Entry Point
99
#
98
#
Line 105... Line 104...
105
#
104
#
106
#   Alter some option defaults if we are creating a view within a sandbox
105
#   Alter some option defaults if we are creating a view within a sandbox
107
#
106
#
108
if ( $GBE_SANDBOX )
107
if ( $GBE_SANDBOX )
109
{
108
{
110
   $opt_view_root = $GBE_SANDBOX;
109
   $GBE_VIEWBASE = $GBE_SANDBOX;
111
   $opt_prefix = 0;
110
   $opt_prefix = 0;
112
}
111
}
113
 
112
 
114
#
113
#
115
#   Parse the user options
114
#   Parse the user options
Line 136... Line 135...
136
                "runtests!"     => \$opt_runtests,          # [no]flag
135
                "runtests!"     => \$opt_runtests,          # [no]flag
137
                "branch=s"      => \$opt_branch,            # String
136
                "branch=s"      => \$opt_branch,            # String
138
                "mkbranch=s"    => \$opt_branch,            # String
137
                "mkbranch=s"    => \$opt_branch,            # String
139
                "prodOnly"      => \$opt_prod_build,        # flag
138
                "prodOnly"      => \$opt_prod_build,        # flag
140
                "debugOnly"     => \$opt_debug_build,       # flag
139
                "debugOnly"     => \$opt_debug_build,       # flag
141
                "root=s"        => \$opt_view_root,         # string
140
                "root=s"        => \$GBE_VIEWBASE,          # string
142
                "prefix!"       => \$opt_prefix,            # flag
141
                "prefix!"       => \$opt_prefix,            # flag
143
                );
142
                );
144
 
143
 
145
                #
144
                #
146
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
145
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
Line 234... Line 233...
234
$user_cwd = getcwd;
233
$user_cwd = getcwd;
235
 
234
 
236
Error ("USER name not determined" )
235
Error ("USER name not determined" )
237
    unless ( $USER );
236
    unless ( $USER );
238
 
237
 
-
 
238
 
239
#
239
#
240
#   Under UNIX, create views in the user home directory
240
#   Clean up the view root directory
241
#
241
#
242
unless ( $opt_view_root  )
-
 
243
{
-
 
244
    if ( $UNIX )
-
 
245
    {
-
 
246
        Error ("Unix HOME EnvVar not defined" ) unless ( $HOME );
-
 
247
        Error ("Unix HOME directory not found: $HOME" ) unless (-d $HOME );
-
 
248
        $VIEWDIR_ROOT = "$HOME/$UNIX_VP_ROOT";
-
 
249
        Verbose ("Unix viewpath: $VIEWDIR_ROOT");
-
 
250
        mkdir ( $VIEWDIR_ROOT ) unless (-d $VIEWDIR_ROOT);
-
 
251
    }
-
 
252
}
-
 
253
else
-
 
254
{
-
 
255
    $opt_view_root = Realpath($opt_view_root) || $opt_view_root;
242
$VIEWDIR_ROOT = Realpath($GBE_VIEWBASE) || $GBE_VIEWBASE;
256
    $VIEWDIR_ROOT = $opt_view_root;
-
 
257
}
-
 
258
 
243
 
259
Verbose ("Viewpath: $VIEWDIR_ROOT");
244
Verbose ("Viewpath: $VIEWDIR_ROOT");
260
Error ("Cannot locate view root directory: $VIEWDIR_ROOT" ) unless (-d $VIEWDIR_ROOT);
245
Error ("Cannot locate view root directory: $VIEWDIR_ROOT" ) unless (-d $VIEWDIR_ROOT);
261
 
246
 
262
#
247
#
Line 978... Line 963...
978
jats-lib (cr) package. The version of the packages will not be considered.
963
jats-lib (cr) package. The version of the packages will not be considered.
979
 
964
 
980
=item B<-root=xxx>
965
=item B<-root=xxx>
981
 
966
 
982
This option allows the location of the generated view to be specified on the
967
This option allows the location of the generated view to be specified on the
983
command line. The environment variable GBE_VIEWBASE provides the same feature,
968
command line. It overides the value of GBE_VIEWBASE.
984
but it will affect all the view created.
-
 
985
 
-
 
986
The default location is:
-
 
987
 
-
 
988
=over 8
-
 
989
 
-
 
990
=item WINDOWS
-
 
991
 
-
 
992
c:\clearcase
-
 
993
 
-
 
994
=item Unix
-
 
995
 
-
 
996
$(HOME)/jats_cbuilder
-
 
997
 
969
 
998
If the comamnd is invoked within a development sandbox, then the default
970
If the comamnd is invoked within a development sandbox, then the default
999
location will be the root directory of the development sandbox.
971
location will be the root directory of the development sandbox.
1000
 
972
 
1001
=back
973
=back