org.eclipse.cdt.make.internal.core.makefile
Class AbstractMakefile

java.lang.Object
  extended by org.eclipse.cdt.make.internal.core.makefile.Directive
      extended by org.eclipse.cdt.make.internal.core.makefile.Parent
          extended by org.eclipse.cdt.make.internal.core.makefile.AbstractMakefile
All Implemented Interfaces:
IDirective, IMakefile, IParent
Direct Known Subclasses:
GNUMakefile, NullMakefile, PosixMakefile

public abstract class AbstractMakefile
extends Parent
implements IMakefile

Makefile : ( statement ) * statement : rule | macro_definition | comments | empty rule : inference_rule | target_rule inference_rule : target ':' ( command ) + target_rule : target [ ( target ) * ] ':' [ ( prerequisite ) * ] [ ';' command ] [ ( command ) * ] macro_definition : string '=' (string)* comments : ('#' (string) ) * empty : command : prefix_command string target : string prefix_command : '-' | '@' | '+' internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"


Constructor Summary
AbstractMakefile(Directive parent)
           
 
Method Summary
 java.lang.String expandString(java.lang.String line)
          Returning after expanding any macros.
 java.lang.String expandString(java.lang.String line, boolean recursive)
          Returning after expanding any macros.
 IInferenceRule[] getBuiltinInferenceRules()
           
 IInferenceRule[] getBuiltinInferenceRules(java.lang.String target)
           
 IMacroDefinition[] getBuiltinMacroDefinitions()
          Return all the buil-in MacroDefintions
 IMacroDefinition[] getBuiltinMacroDefinitions(java.lang.String name)
          Returns the Builtin macro definition for name.
abstract  IDirective[] getBuiltins()
          Return all the builtin directives.
 IInferenceRule[] getInferenceRules()
          Returns IInferenceRule
 IInferenceRule[] getInferenceRules(java.lang.String target)
          Returns the IInferenceRules for target.
 IMacroDefinition[] getMacroDefinitions()
          Return IMacroDefinition
 IMacroDefinition[] getMacroDefinitions(java.lang.String name)
          Returns the IMacroDefinitions for name.
 IRule[] getRules()
          ITargetRule | IInferenceRule | ISpecialRule
 IRule[] getRules(java.lang.String target)
          Returns the IRule for target.
 ITargetRule[] getTargetRules()
          Returns ITargetRule
 ITargetRule[] getTargetRules(java.lang.String target)
          Returns the ITargetRules for name.
 
Methods inherited from class org.eclipse.cdt.make.internal.core.makefile.Parent
addDirective, addDirectives, clearDirectives, getDirectives, getDirectives, getStatements, toString
 
Methods inherited from class org.eclipse.cdt.make.internal.core.makefile.Directive
getEndLine, getFileName, getParent, getStartLine, setEndLine, setFilename, setLines, setParent, setStartLine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.cdt.make.core.makefile.IMakefile
parse
 
Methods inherited from interface org.eclipse.cdt.make.core.makefile.IParent
getDirectives
 
Methods inherited from interface org.eclipse.cdt.make.core.makefile.IDirective
getEndLine, getFileName, getParent, getStartLine, toString
 

Constructor Detail

AbstractMakefile

public AbstractMakefile(Directive parent)
Method Detail

getBuiltins

public abstract IDirective[] getBuiltins()
Description copied from interface: IMakefile
Return all the builtin directives.

Specified by:
getBuiltins in interface IMakefile
Returns:

getRules

public IRule[] getRules()
Description copied from interface: IMakefile
ITargetRule | IInferenceRule | ISpecialRule

Specified by:
getRules in interface IMakefile
Returns:

getRules

public IRule[] getRules(java.lang.String target)
Description copied from interface: IMakefile
Returns the IRule for target.

Specified by:
getRules in interface IMakefile
Returns:

getInferenceRules

public IInferenceRule[] getInferenceRules()
Description copied from interface: IMakefile
Returns IInferenceRule

Specified by:
getInferenceRules in interface IMakefile
Returns:

getInferenceRules

public IInferenceRule[] getInferenceRules(java.lang.String target)
Description copied from interface: IMakefile
Returns the IInferenceRules for target.

Specified by:
getInferenceRules in interface IMakefile
Returns:

getTargetRules

public ITargetRule[] getTargetRules()
Description copied from interface: IMakefile
Returns ITargetRule

Specified by:
getTargetRules in interface IMakefile
Returns:

getTargetRules

public ITargetRule[] getTargetRules(java.lang.String target)
Description copied from interface: IMakefile
Returns the ITargetRules for name.

Specified by:
getTargetRules in interface IMakefile
Returns:

getMacroDefinitions

public IMacroDefinition[] getMacroDefinitions()
Description copied from interface: IMakefile
Return IMacroDefinition

Specified by:
getMacroDefinitions in interface IMakefile
Returns:

getMacroDefinitions

public IMacroDefinition[] getMacroDefinitions(java.lang.String name)
Description copied from interface: IMakefile
Returns the IMacroDefinitions for name.

Specified by:
getMacroDefinitions in interface IMakefile
Returns:

getBuiltinMacroDefinitions

public IMacroDefinition[] getBuiltinMacroDefinitions()
Description copied from interface: IMakefile
Return all the buil-in MacroDefintions

Specified by:
getBuiltinMacroDefinitions in interface IMakefile
Returns:

getBuiltinMacroDefinitions

public IMacroDefinition[] getBuiltinMacroDefinitions(java.lang.String name)
Description copied from interface: IMakefile
Returns the Builtin macro definition for name.

Specified by:
getBuiltinMacroDefinitions in interface IMakefile
Returns:

getBuiltinInferenceRules

public IInferenceRule[] getBuiltinInferenceRules()

getBuiltinInferenceRules

public IInferenceRule[] getBuiltinInferenceRules(java.lang.String target)

expandString

public java.lang.String expandString(java.lang.String line)
Description copied from interface: IMakefile
Returning after expanding any macros.

Specified by:
expandString in interface IMakefile
Returns:
String - expanded line

expandString

public java.lang.String expandString(java.lang.String line,
                                     boolean recursive)
Description copied from interface: IMakefile
Returning after expanding any macros.

Specified by:
expandString in interface IMakefile
Returns:
String - expanded line