Target

The core of reggae's D-based DSL for describing build systems. Targets contain outputs, a command to generate those outputs, explicit dependencies and implicit dependencies. All dependencies are themselves Target structs.

The command is given as a string. In this string, certain words have special meaning: $in, $out, $project and builddir.

$in gets expanded to all explicit dependencies. $out gets expanded to all outputs. $project gets expanded to the project directory (i.e. the directory including the source files to build that was given as a command-line argument). This can be useful when build outputs are to be placed in the source directory, such as automatically generated source files. $builddir expands to the build directory (i.e. where reggae was run from).

Constructors

this
this(string output)
Undocumented in source.
this
this(O outputs, C command)
Undocumented in source.
this
this(O outputs, C command, D dependencies)
Undocumented in source.
this
this(O outputs, C command, D dependencies, I implicits)
Undocumented in source.

Members

Functions

commandParamNames
const(string)[] commandParamNames()
Undocumented in source. Be warned that the author may not have intended to support it.
execute
const(string)[] execute(Options options)
Undocumented in source. Be warned that the author may not have intended to support it.
expandOutputs
auto expandOutputs(string projectPath)

Replace special variables and return a list of outputs thus modified

getCommandParams
string[] getCommandParams(string projectPath, string key, string[] ifNotFound)
Undocumented in source. Be warned that the author may not have intended to support it.
getCommandType
CommandType getCommandType()
Undocumented in source. Be warned that the author may not have intended to support it.
getLanguage
Language getLanguage()
Undocumented in source. Be warned that the author may not have intended to support it.
hasDefaultCommand
bool hasDefaultCommand()
Undocumented in source. Be warned that the author may not have intended to support it.
isLeaf
bool isLeaf()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Target other)
Undocumented in source. Be warned that the author may not have intended to support it.
rawCmdString
string rawCmdString(string projectPath)
Undocumented in source. Be warned that the author may not have intended to support it.
shellCommand
string shellCommand(Options options, Flag!"dependencies" deps)

returns a command string to be run by the shell

toBytes
ubyte[] toBytes(Options options)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString(Options options)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

dependenciesInProjectPath
string dependenciesInProjectPath [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
dependencyTargets
string dependencyTargets [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
implicitTargets
string implicitTargets [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
implicitsInProjectPath
string implicitsInProjectPath [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
rawOutputs
string rawOutputs [@property setter]

The outputs without expanding special variables

Static functions

fromBytes
Target fromBytes(ubyte[] bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
phony
Target phony(string name, string shellCommand, T args)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

noTargets
enum Target[] noTargets;
Undocumented in source.

Meta