OpenMake Meister

GetSubTaskDeps ( $TargetDeps, $TargetRelDeps, $wanted_dir, $sub_task_ext )

 

Resolves all “Results From” Sub Task dependencies found in the Target Definition File for a given Sub Task extension.  Once the derived dependency is located in the TargetDeps or TargetRelDeps array, it is scanned for any included file references.  All file references are put into an array of Sub Task Dependencies along with the relative path to their root location.  Consider the passed in Sub Task file “int_classes/hello.javac”.  contained in “int+classes/hello.javac” are references to all of the classes required to build the hello.jar target.  For example:

 

                     com/my/package/*.class

 

GetSubTaskDeps will return all of the class reference found in hello.javac as well as the relative path to the root of those locations.  In this case, the relative path would resolve to:

 

                               int_classes

 

and the classes would be:

 

                     com/my/packages/*.class

 

USAGE:

($rel_dir, @subtask_deps) = &GetSubTaskDeps($TargetDeps,$TargetRelDeps,$wanted_dir,$sub_task_ext);

 

$TargetDeps and $TargetRelDeps are Openmake::FileList references.

$wanted_dir is a passed in directory value that might contain the derived dependencies, such as Ant’s basedir=<value>.  An empty value assumes “.”.

 

$sub_task_ext is the extension to search for, such as .javac, .rmic, .jup.

 

RETURNS:

The relative directory where all of the derived dependencies are found and the complete list of the resolved dependencies in an array.