Logo Search packages:      
Sourcecode: jmk version File versions  Download package

void edu::neu::ccs::jmk::Make::addRule ( String  target,
String[]  prerequisites,
Command[]  commands,
int  lineNumber 
) [inline, package]

Add something that parses as a rule. The means one could be adding a pattern, a special target, or a makefile rule.

Definition at line 139 of file Make.java.

References maybeAddPattern(), maybeAddSpecialTarget(), and edu::neu::ccs::jmk::Rule::merge().

    if (maybeAddPattern(target, prerequisites, commands, lineNumber))
    if (maybeAddSpecialTarget(target, prerequisites))
    if (!hasSeenARule) {      // A real rule has been found
      defaultTarget = target; // Set default target if not set
      hasSeenARule = true;
    Rule rule = get(target);  // The get will create a rule if none exists
    Rule[] dependencies = new Rule[prerequisites.length];
    for (int i = 0; i < prerequisites.length; i++) // Replace names
      dependencies[i] = get(prerequisites[i]); // by rules
    rule.merge(dependencies, commands, lineNumber);

Generated by  Doxygen 1.6.0   Back to index