Subversion Repositories DevTools

Rev

Rev 6276 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6276 Rev 7213
Line 82... Line 82...
82
#
82
#
83
#                   Options are:
83
#                   Options are:
84
#                   --ScanDependencies  - Collect information on dependent packages
84
#                   --ScanDependencies  - Collect information on dependent packages
85
#                   --LocateAll         - Scan for ANT and JATS build files
85
#                   --LocateAll         - Scan for ANT and JATS build files
86
#                   --LimitDepth=n      - Limit the depth of the scan
86
#                   --LimitDepth=n      - Limit the depth of the scan
-
 
87
#                   --stop              - Ignore if a 'stop' file exists in the directory
87
#
88
#
88
#
89
#
89
# Returns         : A reference to class.
90
# Returns         : A reference to class.
90
#
91
#
91
sub BuildFileScanner {
92
sub BuildFileScanner {
Line 95... Line 96...
95
    $self->{file}  = shift;
96
    $self->{file}  = shift;
96
    $self->{info} = [];
97
    $self->{info} = [];
97
    $self->{scandeps} = 0;
98
    $self->{scandeps} = 0;
98
    $self->{locateAll} = 0;             # Scan Jats and Ant files
99
    $self->{locateAll} = 0;             # Scan Jats and Ant files
99
    $self->{LimitDepth} = 0;            # Skim the tree
100
    $self->{LimitDepth} = 0;            # Skim the tree
-
 
101
    $self->{Stop} = 0;                  # Support a 'stop' file
100
 
102
 
101
    bless ($self);
103
    bless ($self);
102
 
104
 
103
    Error ("Locating Build files. Root directory not found",
105
    Error ("Locating Build files. Root directory not found",
104
           "Path: $self->{root}" ) unless ( -d $self->{root} );
106
           "Path: $self->{root}" ) unless ( -d $self->{root} );
Line 139... Line 141...
139
        $self->{scandeps} = 2;
141
        $self->{scandeps} = 2;
140
 
142
 
141
    } elsif ( $opt =~ m/^--LocateAll/ ) {
143
    } elsif ( $opt =~ m/^--LocateAll/ ) {
142
        $self->{locateAll} = 1;
144
        $self->{locateAll} = 1;
143
 
145
 
-
 
146
    } elsif ( $opt =~ m/^--Stop/ ) {
-
 
147
        $self->{Stop} = 1;
-
 
148
 
144
    } elsif ( $opt =~ m/^--LimitDepth=(\d+)/ ) {
149
    } elsif ( $opt =~ m/^--LimitDepth=(\d+)/ ) {
145
        $self->{LimitDepth} = $1;
150
        $self->{LimitDepth} = $1;
146
 
151
 
147
    } else {
152
    } else {
148
        $result = 0;
153
        $result = 0;
Line 283... Line 288...
283
                    $File::Find::prune = 1;
288
                    $File::Find::prune = 1;
284
                    Verbose3( "locateBuildFile: LimitDepth: $_");
289
                    Verbose3( "locateBuildFile: LimitDepth: $_");
285
                    return;
290
                    return;
286
                }
291
                }
287
            }
292
            }
-
 
293
 
-
 
294
            #
-
 
295
            #   Stop file processing
-
 
296
            #   If the directory conatins a 'stop' file then we won't find any build files in it
-
 
297
            #   Nor should we find any below it.
-
 
298
            #
-
 
299
            if ($self->{Stop})
-
 
300
            {
-
 
301
               if ( -f $File::Find::name . '/stop' )
-
 
302
               {
-
 
303
                   $File::Find::prune = 1;
-
 
304
                   Verbose0( "locateBuildFile: Stop file: $_");
-
 
305
                   return;
-
 
306
 
-
 
307
               }
-
 
308
            }
288
        }
309
        }
289
 
310
 
290
        if ( $file eq $ff_file  )
311
        if ( $file eq $ff_file  )
291
        {
312
        {
292
            if ( $ff_ant )
313
            if ( $ff_ant )