OpenMake Meister

GetExcludes( $Defines )

 

You can exclude any dependency from being used in a Task, including the files generated by other Tasks. This exclusion is achieved through the use of the "exclude" variable.  This variable is passed to the Build Methods via the "<Task> Flags" field on the JAVA Target Editor.

 

Passing the parameter "exclude" to the Build Methods along with the value of a specific Task by using the "<Task> Flags" field, causes the files generated by that Task to be ignored. When passing the exclude value, as entered on the JAVA Target Detail Screen, you must use the Task number to signify which of the Task's generated files to exclude.  It is important to use the number because you may use a Task more than once.  The number signifies the order in which the Task is executed and makes the Task unique.  Excluding the files generated by a specific Task can be useful if those files should not be included in another Task.   Pass the following parameter to the Build Method by using the "<Task> Flags" Field:

 

exclude="<Task name>"

exclude= "A.Ant JDK 1-3 Javac"

 

In addition, you can simply pass only the name of a Dependency such as:

exclude= myfile.java exclude=myfile2.java

or

Exclude *.java

 

This function returns the excluded file pattern and removes the exclude statement from the $Defines Variable.

 

USAGE:

 

( $pureDefines, @excludePatterns ) = GetExcludes ( $Defines );

 

 Note:  $Defines is a reserved Variable.

 

 

RETURNS:

 

     ( $pureDefines, @excludePatterns )

 

      $pureDefines is the processed $Defines string with the Exclude

      statement removed

 

      @excludePatterns is the list of excluded patterns from the $Defines string

     

For Example:

 

        $Defines = 'flag1 exclude=.java exclude=.class flag4';

 

RETURNS:

$pureDefines will contain  'flag1 flag4';

@excludePatterns will be a list containing .java and

.class