aboutsummaryrefslogtreecommitdiff
path: root/emacs/Makefile
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-10 11:24:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-10 11:25:47 -0700
commitfd58b21f9af92ebf0bc37cf53eec05feacbe0780 (patch)
treea90574af4772a5c0af96ed9524a57cb838e37255 /emacs/Makefile
parent6023b51ef5d31e33e2ee4a92490c2b16d8ca526a (diff)
downloadconsfigurator-fd58b21f9af92ebf0bc37cf53eec05feacbe0780.tar.gz
dynamically regenerate emacs/put-forms.el at package build time
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'emacs/Makefile')
-rw-r--r--emacs/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/Makefile b/emacs/Makefile
index 1c29533..3f9309c 100644
--- a/emacs/Makefile
+++ b/emacs/Makefile
@@ -1,6 +1,14 @@
+LOAD = '(let ((asdf:*user-cache* "/tmp") \
+ (asdf:*central-registry* (list (truename "..")))) \
+ (asdf:load-system "consfigurator"))'
+
SUBSTITUTE = 'BEGIN { open FH, "<", "put-forms.el"; \
chomp($$forms = join "", map s/^/ /r, grep /^\(put/, <FH>) } \
s/ \@putforms@/$$forms/'
consfigurator.el: consfigurator.el.in put-forms.el
perl -wpe$(SUBSTITUTE) consfigurator.el.in >consfigurator.el
+
+put-forms.el:
+ sbcl --disable-debugger --eval '(require "asdf")' --eval $(LOAD) \
+ --eval '(consfigurator::dump-properties-for-emacs "$@")' --quit