BNFC3-3.0: A compiler front-end generator.
Safe HaskellNone
LanguageHaskell2010

BNFC.Backend.Common.Makefile

Synopsis

Documentation

mkRule Source #

Arguments

:: String

The target name.

-> [String]

Dependencies.

-> String

Recipe.

-> Doc () 

Creates a Makefile rule.

>>> mkRule "main" ["file1","file2"] ["do something"]
main : file1 file2
     do something

>>> mkRule "main" ["program.exe"] []
main : program.exe

mkVar :: String -> String -> Doc () Source #

Variable assignment.

>>> mkVar "FOO" "bar"
FOO=bar

refVar :: String -> Doc () Source #

Variable referencing.

>>> refVar "FOO"
"${FOO}"