commit: 21b7a3c44f19f3c9d15466ee2a955833518a88e4
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 10:45:32 2022 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 10:45:32 2022 +0000
URL: https://gitweb.gentoo.org/proj/emacs-openrc.git/commit/?id=21b7a3c4
Makefile: update
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
Makefile | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 62da177..ecb9ff5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,12 @@
+PWD ?= $(shell pwd)
+
+ELS = $(wildcard $(PWD)/*.el)
+ELCS = $(ELS:.el=.elc)
+
EMACS := emacs
-FIND := find
+FIND := rm -f
-EMACFLAGS := --batch -q --no-site-file
+EMACFLAGS := --batch -q --no-site-file -L $(PWD)
EMACSCMD = $(EMACS) $(EMACFLAGS)
@@ -10,15 +15,16 @@ all: clean compile
.PHONY: clean
clean:
- $(FIND) $(PWD) -iname "*.elc" -delete
+ $(RM) $(ELCS)
%.elc:
$(EMACSCMD) --eval "(byte-compile-file \"$(*).el\" 0)"
.PHONY: compile
-compile: openrc.elc
+compile: $(ELCS)
.PHONY: install
install: compile
$(EMACSCMD) \
- --eval "(require 'package)" --eval "(package-install-file
\"$(PWD)\")"
+ --eval "(require 'package)" \
+ --eval "(package-install-file \"$(PWD)\")"