1Makefile::AST(3)      User Contributed Perl Documentation     Makefile::AST(3)
2
3
4

NAME

6       Makefile::AST - AST for (GNU) makefiles
7

DESCRIPTION

9       The structure of this (GNU) makefile AST is designed based on GNU
10       make's data base listing output produced by "--print-data-base".
11
12       This AST library provides the following classes:
13
14       Makefile::AST
15           The primary class for ASTs. Provides interface for node adding and
16           querying, such as "add_implicit_rule", "apply_implicit_rules",
17           "add_explicit_rule", "apply_explicit_rules", "add_var",
18           "add_auto_var", "get_var", as well as lots of other utility
19           functions, like method "eval_var_value" for computing the ultimate
20           values of makefile variables, method "enter_pad" and "leave_pad"
21           for local variable's scoping pad.
22
23       Makefile::AST::Rule::Base
24           This is the base class for the rule nodes in the AST. It has
25           properties like "normal_prereqs", "order_prereqs", "commands", and
26           "colon".
27
28       Makefile::AST::Rule
29           This class represents the de-sugared form of simple rules and
30           implicite rules after application. It inherits from
31           Makefile::AST::Rule::Base, and adds new properties "target" and
32           "other_targets".
33
34       Makefile::AST::Rule::Implicit
35           This class represents the implicit rule nodes in the AST. It
36           inherits from Makefile::AST::Rule::Base, and adds new properties
37           "targets", "match_anything", and "is_terminal".
38
39       Makefile::AST::StemMatch
40           This class encapsulates the file pattern matching (file names
41           containing "%") and stem substitution algorithms.
42
43       Makefile::AST::Variable
44           It represents the makefile variable nodes in the AST, including
45           "name", "value", "flavor", and "origin".
46
47       Makefile::AST::Command
48           Used to encapsulate information regarding makefile rule commands
49           (e.g. command body, command modifiers "@", "-", "+", and etc.) as a
50           whole.
51

LIMITATIONS AND TODO

53       Adding support for other flavors' makes into this AST libary should
54       make a huge amount of sense. The most interesting candiate is
55       Microsoft's NMAKE.
56

SVN REPOSITORY

58       For the very latest version of this script, check out the source from
59
60       <http://svn.openfoundry.org/makefileparser/branches/gmake-db>.
61
62       There is anonymous access to all.
63

AUTHOR

65       Agent Zhang "<agentzh@yahoo.cn>"
66
68       Copyright (c) 2007-2008 by Agent Zhang (agentzh).
69
70       This library is free software; you can redistribute it and/or modify it
71       under the same terms as Perl itself.
72

SEE ALSO

74       Makefile::AST::Evaluator, Makefile::Parser::GmakeDB, makesimple,
75       pgmake-db, Makefile::DOM.
76
77
78
79perl v5.10.1                      2008-03-16                  Makefile::AST(3)
Impressum