drasil-build-0.1.1.0: A framework for code and document generation for scientific software - Build System SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Build.Drasil.Make.AST

Description

Defines a Makefile abstract syntax tree.

Synopsis

Types

newtype Makefile Source #

A Makefile is made up of Makefile rules.

Constructors

M [Rule] 

data Rule Source #

A Makefile Rule can have comments and commands but needs a target, dependencies, and a type.

data Command Source #

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

Instances details
Eq CommandOpts Source # 
Instance details

Defined in Build.Drasil.Make.AST

data Type Source #

Type of rule, either abstract or file-oriented.

Constructors

Abstract 
File 

Instances

Instances details
Eq Type Source # 
Instance details

Defined in Build.Drasil.Make.AST

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

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.