Documentation ¶
Overview ¶
Package makefile implements output to Makefiles.
Index ¶
- Constants
- type Compiler
- type Condition
- type Output
- func (o *Output) Compile(compiler Compiler) error
- func (o *Output) Filenames() []string
- func (o *Output) GenerateFile(filename string, w io.Writer) error
- func (o *Output) HasTarget(name string) bool
- func (o *Output) IfTrueCondition(variable string) *Condition
- func (o *Output) Target(name string) *Target
- func (o *Output) VariableGroup(description string) *VariableGroup
- type SkipAsMakefileDependency
- type Target
- type Trigger
- type Variable
- type VariableGroup
Constants ¶
const ( VariableGroupCommon = "common variables" VariableGroupDocker = "docker build settings" VariableGroupExtra = "extra variables" VariableGroupHelp = "help menu" VariableGroupSourceDateEpoch = "source date epoch of first commit" VariableGroupTargets = "targets defines all the available targets" VariableGroupAdditionalTargets = "additional targets defines all the additional targets" )
Descriptions (used as keys) of some predefined variable groups.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition is a if-clause in Makefile.
type Output ¶
type Output struct { output.FileAdapter // contains filtered or unexported fields }
Output implements Makefile generation.
func (*Output) Compile ¶
Compile implements output.TypedWriter interface.
func (*Output) GenerateFile ¶
GenerateFile implements output.FileWriter interface.
func (*Output) IfTrueCondition ¶
IfTrueCondition creates new Makefile condition.
func (*Output) VariableGroup ¶
func (o *Output) VariableGroup(description string) *VariableGroup
VariableGroup creates new group of variables.
type SkipAsMakefileDependency ¶
type SkipAsMakefileDependency interface {
SkipAsMakefileDependency()
}
SkipAsMakefileDependency signals that this node should never be exposed as Makefile dependency.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target is a Makefile target.
func (*Target) Description ¶
Description attaches target description.
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
Trigger is the expression for the Condition.
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
Variable abstract Makefile variable of different flavors.
func AppendVariable ¶
AppendVariable creates new Variable with appended value (+=).
func MultilineVariable ¶
MultilineVariable creates new Variable with multi-line content (define).
func OverridableVariable ¶
OverridableVariable creates new overridable Variable of recursive (?=) flavor.
func RecursiveVariable ¶
RecursiveVariable creates new Variable of recursive (=) flavor.
func SimpleVariable ¶
SimpleVariable creates new Variable with simple evaluation (:=).
type VariableGroup ¶
type VariableGroup struct {
// contains filtered or unexported fields
}
VariableGroup is a way to group nicely variables in Makefile.
func (*VariableGroup) Generate ¶
func (group *VariableGroup) Generate(w io.Writer) error
Generate renders group to output.
func (*VariableGroup) Variable ¶
func (group *VariableGroup) Variable(variable *Variable) *VariableGroup
Variable appends variable to the group.