makefile-1.1.0.2: Simple Makefile parser and generator
Copyright(c) 2016 Nicolas Mattia
LicenseMIT
MaintainerNicolas Mattia <nicolas@nmattia.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Makefile

Description

This module defines the different types used when working with a Makefile.

# File: Makefile

hello = world

foo: bar
  baz
Makefile {
  entries =
    [ Assignment RecursiveAssign "hello" "world"
    , Rule (Target "foo") [Dependency "bar"] [Command "baz"]
    ]
  }
Synopsis

Documentation

data Makefile Source #

A Makefile object, a list of makefile entries

Constructors

Makefile 

Fields

Instances

Instances details
Read Makefile Source # 
Instance details

Defined in Data.Makefile

Show Makefile Source # 
Instance details

Defined in Data.Makefile

Eq Makefile Source # 
Instance details

Defined in Data.Makefile

data Entry Source #

A makefile entry, either a rule (target: dep1 dep1; commands) or a variable assignment (hello = world or hello := world)

Constructors

Rule Target [Dependency] [Command] 
Assignment AssignmentType Text Text 
OtherLine Text

Catch all value for comments, empty lines and lines that failed to parse.

Instances

Instances details
Read Entry Source # 
Instance details

Defined in Data.Makefile

Show Entry Source # 
Instance details

Defined in Data.Makefile

Methods

showsPrec :: Int -> Entry -> ShowS #

show :: Entry -> String #

showList :: [Entry] -> ShowS #

Eq Entry Source # 
Instance details

Defined in Data.Makefile

Methods

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

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

newtype Target Source #

Makefile target (foo in the example above)

Constructors

Target Text 

Instances

Instances details
IsString Target Source # 
Instance details

Defined in Data.Makefile

Methods

fromString :: String -> Target #

Read Target Source # 
Instance details

Defined in Data.Makefile

Show Target Source # 
Instance details

Defined in Data.Makefile

Eq Target Source # 
Instance details

Defined in Data.Makefile

Methods

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

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

newtype Dependency Source #

Target dependency (bar in the example above)

Constructors

Dependency Text 

Instances

Instances details
IsString Dependency Source # 
Instance details

Defined in Data.Makefile

Read Dependency Source # 
Instance details

Defined in Data.Makefile

Show Dependency Source # 
Instance details

Defined in Data.Makefile

Eq Dependency Source # 
Instance details

Defined in Data.Makefile

newtype Command Source #

Command (baz in the example above)

Constructors

Command Text 

Instances

Instances details
IsString Command Source # 
Instance details

Defined in Data.Makefile

Methods

fromString :: String -> Command #

Read Command Source # 
Instance details

Defined in Data.Makefile

Show Command Source # 
Instance details

Defined in Data.Makefile

Eq Command Source # 
Instance details

Defined in Data.Makefile

Methods

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

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