module
Hace::MakefileConverter
Overview
Converts basic GNU Makefiles into Hacefile.yml content.
Supported subset:
- rules with prerequisites and tab-indented recipes
- multiple targets per rule (become multiple outputs)
- variables (=, :=, ::=, ?=, +=), with $(NAME) / ${NAME} references. Variable values are resolved eagerly (make's "undefined means empty" semantics apply, and recursive variables must be defined before use).
export VAR=valuebecomes anenv:entry- a
SHELLvariable becomes the Hacefileshell:setting - .PHONY and .DEFAULT_GOAL
- automatic variables: $@ $< $^ $? $* and $$ escaping
- pattern rules ("%.o: %.c"), emitted into a
patterns:section
Anything else (conditionals, functions like $(wildcard), include, target-specific variables, static pattern rules, ...) produces a warning and is skipped; conversion never aborts because of unsupported constructs.
Extended Modules
Defined in:
makefile.crConstant Summary
-
MAKEFILE_NAMES =
["Makefile", "makefile", "GNUmakefile"] of ::String -
Basenames that identify a Makefile for runtime detection.
Instance Method Summary
-
#convert(content : String) : String
Convert Makefile content into Hacefile.yml content.
- #looks_like_makefile?(filename : String) : Bool