Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines a Makefile abstract syntax tree.
Synopsis
- newtype Makefile = M [Rule]
- data Rule = R Annotation Target Dependencies Type [Command]
- data Command = C MakeString [CommandOpts]
- data CommandOpts = IgnoreReturnCode
- data Type
- type Annotation = [Comment]
- type Target = MakeString
- type Dependencies = [Target]
- mkFile :: Annotation -> Target -> Dependencies -> [Command] -> Rule
- mkRule :: Annotation -> Target -> Dependencies -> [Command] -> Rule
- mkCheckedCommand :: MakeString -> Command
- mkCommand :: MakeString -> Command
Types
A Makefile Rule can have comments and commands but needs a target, dependencies, and a type.
A command is made up of MakeString
s and command operators.
data CommandOpts Source #
Ignore the return code from the system.
Instances
Eq CommandOpts Source # | |
Defined in Build.Drasil.Make.AST (==) :: CommandOpts -> CommandOpts -> Bool # (/=) :: CommandOpts -> CommandOpts -> Bool # |
Type of rule, either abstract or file-oriented.
type Annotation = [Comment] Source #
A Makefile Annotation is made of 0 or more Comment
s
type Target = MakeString Source #
A Makefile target is made from a MakeString
.
type Dependencies = [Target] Source #
Dependencies are made up of 0 or more Target
s.
Constructors
mkFile :: Annotation -> Target -> Dependencies -> [Command] -> Rule Source #
Creates a Rule which results in a file being created.
mkRule :: Annotation -> Target -> Dependencies -> [Command] -> Rule Source #
Creates an abstract Rule not associated to a specific file.
mkCheckedCommand :: MakeString -> Command Source #
Creates a Command which fails the make process if it does not return zero.
mkCommand :: MakeString -> Command Source #
Creates a command which executes and ignores the return code.