refactor(cli): doom make: accept functions in make targets

A little less magical (and more performant) than interpolation.
This commit is contained in:
Henrik Lissner
2025-09-15 16:43:52 -04:00
parent 15a0e90808
commit 5cfaf59402
2 changed files with 16 additions and 11 deletions

View File

@@ -34,8 +34,10 @@
(if (null rule)
(print! (warn "No known make rule for: %s" name))
(dolist (entry rule)
(when (stringp entry)
(insert entry "\n")))
(cond ((stringp entry)
(insert entry "\n"))
((functionp entry)
(funcall entry rc))))
(if (null outfile)
(print! "%s" (buffer-string))
(print! (start "Wrote %s") name)