Targets

AbstractTarget

#Maker.AbstractTargetType.


Maker.AbstractTarget

AbstractTarget is an abstract type covering various "targets" or "tasks". Each of these targets normally has an action and zero or more dependencies.

task

#Maker.GenericTargetType.


Maker.GenericTarget

The type created by task(). Fields expected to be accessed publicly include:

  • name::UTF8String
  • dependencies::Vector{UTF8String}
  • description::UTF8String

#Maker.taskFunction.


task(action::Function, name::AbstractString, dependencies=[])
task(name::AbstractString, dependencies=[]) 

Define and register a task target for Maker.jl.

  • action is the function that operates when the target is executed.

  • name refers to the name of the task.

  • dependencies refers to the name (AbstractString) or names (Vector{AbstractString}) of targets that need to be satisfied for this target before running the action. These are also referred to as prerequisites.

Targets are registered globally.

task targets are generic targets used to define actions and dependencies. If a task does not have dependencies, it always runs. If a task has dependencies, the task will run if any of the dependencies has a timestamp newer than the last run of the task. If a file target depends on a task target without dependencies, it will always update.

If the action or dependencies of a target are redefined, the target will be marked as stale, and the action will be updated at the next target check.

See also make, file, and variable. task registers a GenericTarget type.

file

#Maker.FileTargetType.


Maker.FileTarget

The type created by file(). Fields expected to be accessed publicly include:

  • name::UTF8String
  • dependencies::Vector{UTF8String}
  • description::UTF8String

#Maker.fileFunction.


file(action::Function, name::AbstractString, dependencies=[])
file(name::AbstractString, dependencies=[])

Define and register a file target for Maker.jl.

  • action is the function that operates when the target is executed.

  • name refers to the name of the task or target.

  • dependencies refers to the name (AbstractString) or names (Vector{AbstractString}) of targets that need to be satisfied for this target.

Targets are registered globally.

file targets use the name of the file as the name of the target. File targets use timestamps to determine when targets need to be updated. File paths are relative to the current working directory.

If the action or dependencies of a target are redefined, the target will be marked as stale, and the action will be updated at the next target check.

See also make, directory,, task, and variable. file registers a FileTarget type.

directory

#Maker.DirectoryTargetType.


Maker.DirectoryTarget

The type created by directory(). Fields expected to be accessed publicly include:

  • name::UTF8String
  • dependencies::Vector{UTF8String}
  • description::UTF8String

#Maker.directoryFunction.


directory(name::AbstractString, dependencies=[])

Define and register targets for Maker.jl.

  • name refers to the name of the task or target.

  • dependencies refers to the name (AbstractString) or names (Vector{AbstractString}) of targets that need to be satisfied for this target.

Targets are registered globally.

directory targets use the name of the path as the name of the target. No action can be specified. The path name is created with mkpath if it doesn't exist. The path is relative to the current working directory.

directory targets only have a builtin action that creates the directory if it is missing. A timestamp is stored when the directory is created, but the return from timestamp("directorytask") returns the oldest time if the directory exists (it doesn't need to be recreated), and it returns the current time if the directory doesn't exist (it needs to be created).

See also make, file, and task. directory registers a DirectoryTarget type.

variable

#Maker.VariableTargetType.


Maker.VariableTarget

The type created by variable(). Fields expected to be accessed publicly include:

  • name::UTF8String
  • dependencies::Vector{UTF8String}
  • description::UTF8String

#Maker.variableFunction.


variable(action::Function, name::AbstractString, dependencies)

Define and register targets for Maker.jl.

  • action is the function that operates when the target is executed.

  • name refers to the name of the task or target.

  • dependencies refers to the name (AbstractString) or names (Vector{AbstractString}) of targets that need to be satisfied for this target before running the action. These are also referred to as prerequisites.

Targets are registered globally.

variable targets define an action, and the result of the action will be assigned to a global variable (within the Module where the definition is created) named by the argument name. A variable task keeps a timestamp when the action runs. If the result of the action has the same hash as the cached version of the hash, the cached timestamp is used. Using the stored timestamp can reduce the number of unnecessary actions run.

If the action or dependencies of a target are redefined, the target will be marked as stale, and the action will be updated at the next target check.

See also make, file, and task. variable registers a VariableTarget type.

phony

#Maker.PhonyTargetType.


Maker.PhonyTarget

The type created by phony(). Fields expected to be accessed publicly include:

  • name::UTF8String
  • dependencies::Vector{UTF8String}
  • description::UTF8String

#Maker.phonyFunction.


phony(action::Function, name::AbstractString, dependencies=[])
phony(name::AbstractString, dependencies=[]) 

Define and register a phony target for Maker.jl.

  • action is the function that operates when the target is executed.

  • name refers to the name of the task.

  • dependencies refers to the name (AbstractString) or names (Vector{AbstractString}) of targets that need to be satisfied for this target before running the action. These are also referred to as prerequisites.

Targets are registered globally.

phony targets are generic targets that follow the same rules as a task, but phony always has an "ancient" timestamp meaning it won't trigger upstream changes. It does store a timestamp to determine whether to execute its own action based on changes to dependencies.

If the action or dependencies of a target are redefined, the target will be marked as stale, and the action will be updated at the next target check.

See also make, file, task, and variable. phony registers a PhonyTarget type.