aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-02-27 03:53:41 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-02-27 03:53:41 +0100
commite219748ac038905d04db2518ec64e56b40940335 (patch)
tree80f77e1219b488bad8ca3e4e5d7cabeba6691c92 /Makefile
parentbump to 1.0.0 (diff)
downloademacs-ebuild-snippets-e219748ac038905d04db2518ec64e56b40940335.tar.gz
emacs-ebuild-snippets-e219748ac038905d04db2518ec64e56b40940335.tar.bz2
emacs-ebuild-snippets-e219748ac038905d04db2518ec64e56b40940335.zip
Makefile: add Makefile for make
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..57ba9a1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+PWD := $(shell pwd)
+
+ELS = $(wildcard $(PWD)/*.el)
+ELCS = $(ELS:.el=.elc)
+
+EMACS := emacs
+RM := rm -f
+
+EMACFLAGS := --batch -q --no-site-file -L $(PWD)
+EMACSCMD = $(EMACS) $(EMACFLAGS)
+
+
+.PHONY: all
+all: clean compile
+
+.PHONY: clean
+clean:
+ $(RM) $(ELCS)
+
+%.elc:
+ $(EMACSCMD) --eval "(byte-compile-file \"$(*).el\" 0)"
+
+.PHONY: compile
+compile: $(ELCS)