makefile-1.0.0.0: 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 "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

data Entry Source #

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

Instances

Eq Entry Source # 

Methods

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

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

Show Entry Source # 

Methods

showsPrec :: Int -> Entry -> ShowS #

show :: Entry -> String #

showList :: [Entry] -> ShowS #

newtype Target Source #

Makefile target (foo in the example above)

Constructors

Target Text 

newtype Dependency Source #

Target dependency (bar in the example above)

Constructors

Dependency Text 

newtype Command Source #

Command (baz in the example above)

Constructors

Command Text