BNFC-2.9.5: A compiler front-end generator.
Safe HaskellSafe-Inferred
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 -> String Source #

Variable referencing.

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

mkMakefile :: Maybe String -> (String -> Doc) -> Backend Source #

Create the Makefile file using the name specified in the option record.