class Hace::HaceFile

Overview

Parser for Hacefile.yml

Included Modules

Defined in:

hace.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]

Class Method Detail

def self.auto(arguments = [] of String, filename = "Hacefile.yml", cli_args = [] of String) #

[View source]
def self.default_filename : String #

Config file to use when none was given explicitly: prefer Hacefile.yml, falling back to a Makefile in the current directory so hace works out of the box in make-based projects.


[View source]
def self.load_file(filename, variable_overrides : Hash(String, String) = {} of String => String) #

[View source]
def self.process_arguments(hacefile, arguments : Array(String)) #

[View source]
def self.run(arguments = [] of String, filename = "Hacefile.yml", cli_args = [] of String, run_all : Bool = false, dry_run : Bool = false, question : Bool = false, keep_going : Bool = false, parallel : Bool = false) #

[View source]

Instance Method Detail

def env : Hash(String, String?) #

[View source]
def env=(env : Hash(String, Nil | String)) #

[View source]
def gen_tasks(dry_run : Bool = false, requested : Array(String) = [] of String) #

[View source]
def patterns : Array(PatternRule) #

[View source]
def patterns=(patterns : Array(PatternRule)) #

[View source]
def resolve_patterns(requested : Array(String) = [] of String) : HaceFile #

Synthesize concrete tasks from #patterns for dependencies that no explicit task produces, mirroring make's implicit rule behavior. Runs to a fixpoint so patterns can chain (e.g. "%.c: %.tpl" behind "%.o: %.c"). requested holds targets named on the command line, which also get a chance to be instantiated even if nothing depends on them.


[View source]
def shell : String | Nil #

[View source]
def shell=(shell : String | Nil) #

[View source]
def tasks : Hash(String, CommandTask) #

[View source]
def tasks=(tasks : Hash(String, CommandTask)) #

[View source]
def variables : Hash(String, Value) #

[View source]
def variables=(variables : Hash(String, Value)) #

[View source]