mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-16 15:56:52 -05:00
refactor(cli): doom make: accept functions in make targets
A little less magical (and more performant) than interpolation.
This commit is contained in:
9
.doom
9
.doom
@@ -27,7 +27,8 @@
|
|||||||
(make
|
(make
|
||||||
("LICENSE"
|
("LICENSE"
|
||||||
"The MIT License (MIT)\n"
|
"The MIT License (MIT)\n"
|
||||||
,(format-time-string "Copyright (c) 2014-%Y Henrik Lissner.\n")
|
,(lambda (_)
|
||||||
|
(insert (format-time-string "Copyright (c) 2014-%Y Henrik Lissner.\n\n")))
|
||||||
"Permission is hereby granted, free of charge, to any person obtaining
|
"Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
\"Software\"), to deal in the Software without restriction, including
|
\"Software\"), to deal in the Software without restriction, including
|
||||||
@@ -49,14 +50,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.")
|
|||||||
"# Auto-generated by 'doom make .github/CODEOWNERS', do not edit it by hand.\n"
|
"# Auto-generated by 'doom make .github/CODEOWNERS', do not edit it by hand.\n"
|
||||||
"* @doomemacs/maintainers\n" ; default until another takes precedence
|
"* @doomemacs/maintainers\n" ; default until another takes precedence
|
||||||
"# Module maintainers"
|
"# Module maintainers"
|
||||||
,@(cl-sort
|
,(lambda (rc)
|
||||||
|
(mapc (lambda (line) (insert line "\n"))
|
||||||
|
(cl-sort
|
||||||
(cl-loop for path in (doom-module-load-path (list doom-modules-dir))
|
(cl-loop for path in (doom-module-load-path (list doom-modules-dir))
|
||||||
if (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)$" path)
|
if (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)$" path)
|
||||||
collect (format "%-35s @doomemacs/%s-%s"
|
collect (format "%-35s @doomemacs/%s-%s"
|
||||||
(substring (match-string 0 path) 1)
|
(substring (match-string 0 path) 1)
|
||||||
(match-string 1 path)
|
(match-string 1 path)
|
||||||
(match-string 2 path)))
|
(match-string 2 path)))
|
||||||
#'string-lessp)))
|
#'string-lessp)))))
|
||||||
|
|
||||||
(publish
|
(publish
|
||||||
(targets "docs/index.org" "docs" "modules/*/README.org")
|
(targets "docs/index.org" "docs" "modules/*/README.org")
|
||||||
|
@@ -34,8 +34,10 @@
|
|||||||
(if (null rule)
|
(if (null rule)
|
||||||
(print! (warn "No known make rule for: %s" name))
|
(print! (warn "No known make rule for: %s" name))
|
||||||
(dolist (entry rule)
|
(dolist (entry rule)
|
||||||
(when (stringp entry)
|
(cond ((stringp entry)
|
||||||
(insert entry "\n")))
|
(insert entry "\n"))
|
||||||
|
((functionp entry)
|
||||||
|
(funcall entry rc))))
|
||||||
(if (null outfile)
|
(if (null outfile)
|
||||||
(print! "%s" (buffer-string))
|
(print! "%s" (buffer-string))
|
||||||
(print! (start "Wrote %s") name)
|
(print! (start "Wrote %s") name)
|
||||||
|
Reference in New Issue
Block a user