gmakec

package
v0.0.0-...-e8d81be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIGURE_DIR string = ".gmakec"

Variables

This section is empty.

Functions

func InitCompilers

func InitCompilers()

func RemovePath

func RemovePath(path string)

Types

type ActionDefinition

type ActionDefinition struct {
	Ref         string                 `yaml:"ref"`
	Name        string                 `yaml:"name"`
	Description string                 `yaml:"description"`
	Shell       string                 `yaml:"shell"`
	Environment []string               `yaml:"environment"`
	Command     string                 `yaml:"command"`
	Output      ActionOutputDefinition `yaml:"output"`
}

type ActionDumpDefinition

type ActionDumpDefinition struct {
	File string `yaml:"file"`
	Text string `yaml:"text"`
	Mode string `yaml:"mode"`
}

type ActionFailureDefinition

type ActionFailureDefinition struct {
	Continue bool                     `yaml:"continue"`
	Handle   []ActionHandleDefinition `yaml:"handle"`
}

type ActionHandleDefinition

type ActionHandleDefinition struct {
	Define string               `yaml:"define"`
	Print  string               `yaml:"print"`
	Dump   ActionDumpDefinition `yaml:"dump"`
}

type ActionOutputDefinition

type ActionOutputDefinition struct {
	Capture   []string                 `yaml:"capture"`
	OnSuccess []ActionHandleDefinition `yaml:"on_success"`
	OnFailure ActionFailureDefinition  `yaml:"on_failure"`
	Stdout    bytes.Buffer
	Stderr    bytes.Buffer
}

type Compiler

type Compiler struct {
	Name              string
	Path              string
	DefineFlag        string
	IncludeSearchFlag string
	LinkSearchFlag    string
	OutputFlag        string
}

type CompilerDefinition

type CompilerDefinition struct {
	Name   string                   `yaml:"name"`
	Ref    string                   `yaml:"ref"`
	Path   string                   `yaml:"path"`
	Flags  []string                 `yaml:"flags"`
	Find   []CompilerFindDefinition `yaml:"find"`
	Object *Compiler
}

type CompilerFindDefinition

type CompilerFindDefinition struct {
	Type    string   `yaml:"type"`
	Names   []string `yaml:"names"`
	Paths   []string `yaml:"paths"`
	Results []CompilerFindResult
}

type CompilerFindResult

type CompilerFindResult struct {
	Type string
	File string
	Path string
}

type ConfigureFile

type ConfigureFile struct {
	Source      string `yaml:"source"`
	Destination string `yaml:"destination"`
}

func (*ConfigureFile) Execute

func (this *ConfigureFile) Execute(definitionContext *DefinitionContext) error

type DefinitionContext

type DefinitionContext struct {
	DefinitionPath string
	Definition     *GlobalDefinition
	ConfigureDir   string
}

func NewDefinitionContext

func NewDefinitionContext(path string) (*DefinitionContext, error)

func (*DefinitionContext) Build

func (this *DefinitionContext) Build(verbose bool) error

func (*DefinitionContext) Configure

func (this *DefinitionContext) Configure(definitionContexts *[]*DefinitionContext, targets ...string) error

type GlobalDefinition

type GlobalDefinition struct {
	Description  string               `yaml:"description"` // unused atm
	Version      string               `yaml:"version"`
	Compilers    []CompilerDefinition `yaml:"compilers"`
	Actions      []ActionDefinition   `yaml:"actions"`
	Hooks        []HookDefinition     `yaml:"hooks"`
	Targets      []TargetDefinition   `yaml:"targets"`
	Imports      []string             `yaml:"imports"`
	VersionMajor string
	VersionMinor string
	VersionPatch string
	VersionTweak string
}

type HookDefinition

type HookDefinition struct {
	Ref     string             `yaml:"ref"`
	Name    string             `yaml:"name"`
	Step    string             `yaml:"step"`
	Actions []ActionDefinition `yaml:"actions"`
}

type LinkDefinition

type LinkDefinition struct {
	Path string `yaml:"path"`
	Link string `yaml:"link"`
}

type SourceDefinition

type SourceDefinition struct {
	Path     string `yaml:"path"`
	Platform string `yaml:"platform"`
}

type Target

type Target struct {
	Definition *TargetDefinition
	Index      int
	Defines    []string
	Includes   []string
	Links      []string
	Sources    []string
}

type TargetDefinition

type TargetDefinition struct {
	Name           string             `yaml:"name"`
	Platform       string             `yaml:"platform"`
	Compiler       CompilerDefinition `yaml:"compiler"`
	ConfigureFiles []ConfigureFile    `yaml:"configure_files"`
	Defines        []string           `yaml:"defines"`
	Sources        []SourceDefinition `yaml:"sources"`
	Includes       []string           `yaml:"includes"`
	Links          []LinkDefinition   `yaml:"links"`
	Output         string             `yaml:"output"`
	Dependencies   []string           `yaml:"dependencies"`
	Hooks          []HookDefinition   `yaml:"hooks"`
}

type TargetGroup

type TargetGroup struct {
	Targets []int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL