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

synchronized void edu::neu::ccs::jmk::Make::load (  )  throws FileNotFoundException, ParseError [inline]

This method loads a makefile. In addition to parsing the input, the value associated with each identifier through an assignment is substituted for the identifer, and all string functions are executed. The result is a make object that contains only rules and patterns.

The makefile loader expects input to conform to the grammar given below. Comments start with the sharp sign character (#) and continue to the end of the line. In the grammar, syntactic categories begin with an uppercase letter. The pattern Thing... indicates zero or more Things, and vertical bar indicates alternatives. In the grammar, The pattern Thing... indicates zero or more Things, Thing,,, indicates one or Things separated by commas, and vertical bar indicates alternatives.

<blockquote> Makefile -> Statement Statement...
Statement -> Assignment | Rule | Inclusion | Conditional
Assignment -> Identifier = List ;
List -> Item...
Item -> String | Identifier | (Item List,,,) | { Block } | if List then Block else Block end | function (Identifier,,,) Block end | do Identifier (Initializer,,,) Block end
Block -> Assignment... List
Initializer -> Identifier = List
Rule -> Item List : List ; Commands
Commands -> | { Command... }
Command -> Ignore Operator List ;
Ignore -> | -
Operator -> exec | delete | delall | mkdir | mkdirs | copy | rename | create | note | forname
Inclusion -> include List ;
Conditional -> if List then Statement... Alternative end
Alternative -> | else Statement...
String -> "</tt> Characters... <tt>"
Identifier -> JavaIdentifier | </tt> | < | ? | % </blockquote>

The JavaIdentifiers that are reserved and not available as Identifiers are include, if, then, else, end, and function.

FileNotFoundException if an error occurs will opening the file
ParseError if an error occurs during loading

Definition at line 364 of file Make.java.

References getFile().

Referenced by readAndMake().

    load(new FileReader(getFile()));

Generated by  Doxygen 1.6.0   Back to index