| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Build.Drasil.Make.AST
Contents
Description
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.
Constructors
| R Annotation Target Dependencies Type [Command] |
A command is made up of MakeStrings and command operators.
Constructors
| C MakeString [CommandOpts] |
data CommandOpts Source #
Ignore the return code from the system.
Constructors
| IgnoreReturnCode |
Instances
| Eq CommandOpts Source # | |
Defined in Build.Drasil.Make.AST | |
Type of rule, either abstract or file-oriented.
type Annotation = [Comment] Source #
A Makefile Annotation is made of 0 or more Comments
type Target = MakeString Source #
A Makefile target is made from a MakeString.
type Dependencies = [Target] Source #
Dependencies are made up of 0 or more Targets.
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.