summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makefile17
2 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index fbbb432..97916bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-06-17 Ulrich Müller <ulm@gentoo.org>
+
+ * Makefile (ELCS, INFOFILES, EMACS, EMACSFLAGS): New variables.
+ (.PHONY): Add keywords target.
+ (all): Build ELCS and INFOFILES by default.
+ (%.elc, %.info): New rules.
+ (clean): Add *.elc.
+
2023-06-15 Ulrich Müller <ulm@gentoo.org>
* ebuild-mode.el (ebuild-mode-put-keywords): Do not modify the
diff --git a/Makefile b/Makefile
index 16178c8..a0537f7 100644
--- a/Makefile
+++ b/Makefile
@@ -10,12 +10,21 @@ DISTFILES = ebuild-mode.el ebuild-mode-keywords.el \
devbook-mode.el gentoo-newsitem-mode.el glep-mode.el \
ebuild-mode.texi keyword-generation.sh ChangeLog
+ELCS = ebuild-mode.elc devbook-mode.elc gentoo-newsitem-mode.elc glep-mode.elc
+INFOFILES = ebuild-mode.info
-.PHONY: all dist clean
+EMACS = emacs
+EMACSFLAGS = -batch -q --no-site-file
-all:
+.PHONY: all keywords dist clean
-ebuild-mode.info: ebuild-mode.texi
+all: $(ELCS) $(INFOFILES)
+
+%.elc: %.el
+ $(EMACS) $(EMACSFLAGS) -eval "(add-to-list 'load-path nil)" \
+ -f batch-byte-compile $<
+
+%.info: %.texi
makeinfo $<
keywords:
@@ -26,4 +35,4 @@ dist: $(DISTFILES)
tar -tJvf $(P).tar.xz
clean:
- -rm -f *~ *.tmp *.gz *.bz2 *.xz *.info
+ -rm -f *~ *.tmp *.gz *.bz2 *.xz *.elc *.info