aboutsummaryrefslogtreecommitdiff
path: root/lisp/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/Makefile')
-rw-r--r--lisp/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/lisp/Makefile b/lisp/Makefile
new file mode 100644
index 0000000..3153b9b
--- /dev/null
+++ b/lisp/Makefile
@@ -0,0 +1,28 @@
+EMACS=emacs
+SITEFLAG=--no-site-file
+ALLSOURCE=$(wildcard *.el)
+ALLCOMPILED=$(wildcard *.elc)
+SPECIAL=emms-auto.el emms-maint.el
+SOURCE=$(filter-out $(SPECIAL),$(ALLSOURCE))
+TARGET=$(patsubst %.el,%.elc,$(SOURCE))
+
+.PHONY: all clean
+.PRECIOUS: %.elc
+all: $(TARGET) emms-auto.el
+
+emms-auto.el: emms-auto.in $(SOURCE)
+ cp emms-auto.in emms-auto.el
+ -rm -f emms-auto.elc
+ @$(EMACS) -q $(SITEFLAG) -batch \
+ -l emms-maint.el \
+ -l emms-auto.el \
+ -f generate-autoloads \
+ $(shell pwd)/emms-auto.el .
+
+%.elc: %.el
+ @$(EMACS) -q $(SITEFLAG) -batch \
+ -l emms-maint.el \
+ -f batch-byte-compile $<
+
+clean:
+ -rm -f *~ *.elc emms-auto.el