From 9476898539bd9ad72a5b45bc1625fa398eada879 Mon Sep 17 00:00:00 2001 From: "Pedro A. Aranda" Date: Mon, 11 Mar 2024 09:48:10 +0100 Subject: [PATCH 2/3] Clean .eln files from user emacs configuration * lisp/Makefile: Get the directory where emacs stores the compiled files in the user storage and use that to locate the .eln files generated by 'make native' and delete them --- lisp/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/Makefile b/lisp/Makefile index c570d9cfa..506aa75e1 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -11,6 +11,9 @@ LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el))) LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc)) LISPN := $(filter-out $(LISPB) $(LISPN:%el=%eln),$(LISPF:%el=%eln)) _ORGCM_ := dirall single native source slint1 slint2 +# This is where Emacs stores the .eln files +ELNDIR = $(shell emacs --batch --eval '(princ (car native-comp-eln-load-path))') + -include local.mk .PHONY: all compile compile-dirty \ @@ -79,6 +82,11 @@ cleanauto clean cleanall:: clean cleanall cleanelc:: $(RM) *.elc +cleaneln:: + for elnf in $(patsubst %.eln, %-*.eln, $(LISPN)); do \ + find $(ELNDIR) -name $$elnf -exec $(RM) -v {} \; ;\ + done + clean-install: if [ -d $(DESTDIR)$(lispdir) ] ; then \ $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* $(DESTDIR)$(lispdir)/ol*.el* $(DESTDIR)$(lispdir)/ox*.el* ; \ -- 2.34.1