Copyright | Copyright 2017 Awake Security |
---|---|
License | Apache-2.0 |
Maintainer | opensource@awakesecurity.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
A datatype for Ninja rule
declarations.
Since: 0.1.0
- data Rule
- makeRule :: Text -> Command -> Rule
- ruleName :: Lens' Rule Text
- ruleCommand :: Lens' Rule Command
- ruleDescription :: Lens' Rule (Maybe Text)
- rulePool :: Lens' Rule PoolName
- ruleDepfile :: Lens' Rule (Maybe Path)
- ruleSpecialDeps :: Lens' Rule (Maybe SpecialDeps)
- ruleGenerator :: Lens' Rule Bool
- ruleRestat :: Lens' Rule Bool
- ruleResponseFile :: Lens' Rule (Maybe ResponseFile)
- data SpecialDeps
- makeSpecialDepsGCC :: SpecialDeps
- makeSpecialDepsMSVC :: Text -> SpecialDeps
- _SpecialDepsGCC :: Prism' SpecialDeps ()
- _SpecialDepsMSVC :: Prism' SpecialDeps Text
- data ResponseFile
- makeResponseFile :: Path -> Text -> ResponseFile
- responseFilePath :: Lens' ResponseFile Path
- responseFileContent :: Lens' ResponseFile Text
Rule
A Ninja rule
declaration, as documented
here.
Since: 0.1.0
Eq Rule Source # | |
Ord Rule Source # | |
Show Rule Source # | |
Generic Rule Source # | |
Hashable Rule Source # | Default Since: 0.1.0 |
ToJSON Rule Source # | Converts to
Since: 0.1.0 |
FromJSON Rule Source # | Inverse of the Since: 0.1.0 |
NFData Rule Source # | Default Since: 0.1.0 |
(Monad m, Serial m Text) => Serial m Rule Source # | Default Since: 0.1.0 |
(Monad m, CoSerial m Text) => CoSerial m Rule Source # | Default Since: 0.1.0 |
type Rep Rule Source # | |
ruleDescription :: Lens' Rule (Maybe Text) Source #
A short description of the command, used to pretty-print the command
as it's running. The ninja -v
flag controls whether to print the
full command or its description; if a command fails, the full command
line will always be printed before the command's output.
Since: 0.1.0
rulePool :: Lens' Rule PoolName Source #
The process pool in which this rule will be executed.
Since: 0.1.0
ruleDepfile :: Lens' Rule (Maybe Path) Source #
If set, this should be a path to an optional Makefile that contains extra implicit dependencies. This is used to support C/C++ header dependencies. For more information, read the Ninja documentation here.
Since: 0.1.0
ruleSpecialDeps :: Lens' Rule (Maybe SpecialDeps) Source #
If set, enables special dependency processing used in C/C++ header dependencies. For more information, read the Ninja documentation here.
Since: 0.1.0
ruleGenerator :: Lens' Rule Bool Source #
If this is true, specifies that this rule is used to re-invoke the generator program. Files built using generator rules are treated specially in two ways: firstly, they will not be rebuilt if the command line changes; and secondly, they are not cleaned by default.
Since: 0.1.0
ruleRestat :: Lens' Rule Bool Source #
If true, causes Ninja to re-stat the command's outputs after execution of the command. Each output whose modification time the command did not change will be treated as though it had never needed to be built. This may cause the output's reverse dependencies to be removed from the list of pending build actions.
Since: 0.1.0
ruleResponseFile :: Lens' Rule (Maybe ResponseFile) Source #
If present, Ninja will use a response file for the given command, i.e. write the selected string to the given file before calling the command and delete the file after the command is done.
This is particularly useful on Windows OS, where the maximal length of a command line is limited and response files must be used instead.
Since: 0.1.0
SpecialDeps
data SpecialDeps Source #
Special dependency information, as described here.
Since: 0.1.0
Eq SpecialDeps Source # | |
Ord SpecialDeps Source # | |
Read SpecialDeps Source # | |
Show SpecialDeps Source # | |
Generic SpecialDeps Source # | |
Hashable SpecialDeps Source # | Default Since: 0.1.0 |
ToJSON SpecialDeps Source # | Converts to Since: 0.1.0 |
FromJSON SpecialDeps Source # | Inverse of the Since: 0.1.0 |
NFData SpecialDeps Source # | Default Since: 0.1.0 |
(Monad m, Serial m Text) => Serial m SpecialDeps Source # | Default Since: 0.1.0 |
(Monad m, CoSerial m Text) => CoSerial m SpecialDeps Source # | Default Since: 0.1.0 |
type Rep SpecialDeps Source # | |
makeSpecialDepsGCC :: SpecialDeps Source #
Construct a SpecialDeps
corresponding to the case in which deps = gcc
is set in a Ninja build rule.
Since: 0.1.0
makeSpecialDepsMSVC :: Text -> SpecialDeps Source #
Construct a SpecialDeps
corresponding to the case in which deps = msvc
is set and msvc_deps_prefix = …
.
The msvc_deps_prefix
field defines the string which should be stripped
from msvc
's /showIncludes
output. It is only needed if the version of
Visual Studio being used is not English. The value of msvc_deps_prefix
is "Note: including file: "
by default.
Since: 0.1.0
_SpecialDepsGCC :: Prism' SpecialDeps () Source #
A prism for the deps = gcc
case.
Since: 0.1.0
_SpecialDepsMSVC :: Prism' SpecialDeps Text Source #
A prism for the deps = msvc
/ msvc_deps_prefix = …
case.
Since: 0.1.0
ResponseFile
data ResponseFile Source #
A response file to use during rule execution, as documented here.
Since: 0.1.0
Eq ResponseFile Source # | |
Ord ResponseFile Source # | |
Show ResponseFile Source # | |
Generic ResponseFile Source # | |
Hashable ResponseFile Source # | Default Since: 0.1.0 |
ToJSON ResponseFile Source # | Converts to Since: 0.1.0 |
FromJSON ResponseFile Source # | Inverse of the Since: 0.1.0 |
NFData ResponseFile Source # | Default Since: 0.1.0 |
(Monad m, Serial m Text) => Serial m ResponseFile Source # | Default Since: 0.1.0 |
(Monad m, CoSerial m Text) => CoSerial m ResponseFile Source # | Default Since: 0.1.0 |
type Rep ResponseFile Source # | |
:: Path | Corresponds to |
-> Text | Corresponds to |
-> ResponseFile |
Construct a ResponseFile
with the given Path
and content Text
.
Since: 0.1.0
responseFilePath :: Lens' ResponseFile Path Source #
A lens for the rspfile
field.
Since: 0.1.0
responseFileContent :: Lens' ResponseFile Text Source #
A lens for the rspfile_content
field.
Since: 0.1.0