cake3-0.6.0: Third cake the Makefile EDSL

Safe HaskellSafe-Inferred
LanguageHaskell98

Development.Cake3.Types

Synopsis

Documentation

data Variable Source

The representation of Makefile variable.

Constructors

Variable 

Fields

vname :: String

The name of a variable

vval :: Maybe String

Nothing means that variable is defined elsewhere (eg. borrowed from the environment)

data Tool Source

The representation a tool used by the Makefile's recipe. Typical example are gcc or bison

Constructors

Tool 

Fields

tname :: String

Name of tool.

type Command = [CommandPiece] Source

Command represents OS command line and consists of a list of fragments. Each fragment is either text (may contain spaces) or FilePath (spaces should be escaped)

data Flag Source

Constructors

Phony 
Intermediate 

data Recipe Source

Recipe answers to the question 'How to build the targets'. Internally, it contains sets of targets and prerequisites, as well as shell commands required to build former from latter

Constructors

Recipe 

Fields

rtgt :: Set File

Targets

rsrc :: Set File

Prerequisites

rcmd :: [Command]

A list of shell commands

rvars :: Set Variable

A set of variables employed in the recipe. The target Makefile should notice changes in those variables and rebuild the targets

rtools :: Set Tool

A set of tools employed in the recipe. Make

rloc :: String

Location (probably, doesn't function)

rflags :: Set Flag

Set of flags (Makefile-specific)

groupSet :: (Ord k, Ord x, Foldable t) => (x -> Set k) -> t x -> Map k (Set x) Source

flattern :: [Set x] -> [x] Source

applyPlacement' :: Eq x => [File] -> Map File x -> [x] Source

transformRecipesM_ :: (Monad m, Foldable t) => (Recipe -> m ()) -> t Recipe -> m () Source

makevar Source

Arguments

:: String

Variable name

-> String

Default value

-> Variable 

Define the Makefile-level variable. Rules, referring to a variable, notice it's changes.

extvar :: String -> Variable Source

Declare the variable defined elsewhere. Typycally, environment variables may be decalred with this functions. Variables are tracked by the cake3. Rules, referring to a variable, notice it's changes.

make :: Variable Source

Reref to special variable $(MAKE)