OpenMake Meister

CopyLocal( $FullPathDeps, $RelDeps, $toDir )

CopyLocal( $FullPathDeps, $RelDeps, $toDir, @includeExtensions )

 

When a compiler cannot read source code in directories other than the build directory (e.g. JDK 1.1 javac, MicroFocus COBOL), this function copies the files to the local build directory. It keeps track of the files that are copied so they can be deleted when the script exits.

 

The "include" list of extensions is a list of patterns to match against the end of the full path. For example, ".java" copies all java files - regardless of their sub-directory location.

 

 

 CopyLocal filters out the following files:

.packages, .classpath, .javac, .hsig, .rmic, harvest.sig, ~, CVS,     .cvsignore, SCCS, vssver.scc, .tgtdeps

 

USAGE:

 

@localDeps = CopyLocal( $FullPathDeps, $RelDeps, $toDir,

@includeExtensions );

 

$FullPathDeps and $RelDeps are Openmake::FileList references.

$FullPathDeps is the full path.  $RelDeps are the same files but with the

relative paths after they have been copied locally.   $toDir is the destination directory. @includeExtensions is an optional list of extensions to be matched against.

 

For example:

$lf = Openmake::FileList->new( qw( c:\ref\project\dev\hello.c

                                          c:\ref\index.html ) );

$rf = Openmake::FileList->new( qw( project\dev\hello.c index.html));

       @localdeps = CopyLocal( $lf, $rf, 'source', qw( .c ) );

 

In this example, @localdeps would contain the single element "project\dev\hello.c".

 

RETURNS:

 

CopyLocal returns a list of ALL files that exist in the to-directory, after the copy operation, that match the filtering conditions. The files are listed relative to the destination directory, $toDir.