Skip to content

Latest commit

 

History

History
77 lines (67 loc) · 3.59 KB

COMPARISON.md

File metadata and controls

77 lines (67 loc) · 3.59 KB

Makeover vs. GNU Make

A feature comparison between GNU Make and Makeover.

What Makeover has (that overlaps with Make)

Feature GNU Make Makeover
Target/prerequisite declarations Yes Yes
First target = default target Yes Yes
Multiple named targets, left-to-right Yes Yes
Dedupe shared prerequisites per run Yes Yes
Timestamp (mtime) rebuild check Yes Yes
.PHONY targets Yes Yes (only special target supported)
Variables, recursive expansion, $(NAME) Yes Yes
:= and ?= assignment operators Yes Yes (::=, +=, != not supported)
Environment variable fallback Yes Yes
Command-line variable override (VAR=value) Yes Yes
Automatic variables ($@, $<, $^, $?) Yes Yes (only these four)
Recipe line continuation (\ + newline) Yes Yes
Dry run -n Yes Yes
$(wildcard ...) function Yes Yes
Per-recipe-line /bin/sh invocation Yes Yes
@ (silent) and - (ignore failure) prefixes Yes Yes
$$ literal dollar, pass-through of shell vars Yes Yes
-f / --file Yes Yes
-h / --help Yes Yes
Errors for missing files, duplicates, and cycles Yes Yes (Makeover's own errors)

What GNU Make has that Makeover does NOT

Feature GNU Make Makeover
Implicit & pattern rules (%.o: %.c, .c.o:) Yes No
Conditionals (ifeq / ifdef / else / endif) Yes No
Functions beyond wildcard ($(shell), $(patsubst), $(foreach), $(call), $(eval), ...) Yes No
include of other files Yes No
Variable operators ::=, +=, != Yes No
Parallel jobs (-j) Yes No
.ONESHELL / persistent recipe shell Yes No
Force rebuild -B, question -q Yes No
Order-only prerequisites (` `) and double-colon rules Yes
Special targets: .DEFAULT, .PRECIOUS, .DELETE_ON_ERROR, .SECONDARY, .SUFFIXES, etc. Yes No (only .PHONY)
VPATH / vpath Yes No
export / override / undefine directives Yes No
Recursive sub-makes / $(MAKE) Yes No
Target-specific and pattern-specific variables Yes No
Secondary expansion Yes No
Windows support Yes No
-p print database, -d / --debug, --trace Yes No

What Makeover has that GNU Make does NOT

  • Doc comments and [group: Name] sections, with --list help listing
  • Buildfile discovery: walks up the parent directories of the current directory (or the script's location), not just the current directory
  • Case-insensitive, separator-agnostic filename matching (build-file, bUildfile, ...)
  • Vendorable single-file Python script with no dependencies, no network, and no install; designed to be committed to the repository
  • -v / --verbose scoped to Makeover's own build status messages
  • Explicitly rejects unsupported constructs at parse time with line-numbered errors

Notable semantic differences

  • Every recipe line runs in a fresh /bin/sh; there is no .ONESHELL equivalent. Backslash continuations join into a single logical line.
  • A prerequisite that is neither a declared target nor an existing file stops the build (the make equivalent is a missing-rule error).
  • Undefined variables and variable reference cycles are hard errors rather than expanding to empty.
  • Buildfile values take precedence over environment variables; Makeover adds command-line overrides above both. ?= respects all three.

See the Buildfile reference for details on the supported syntax.