diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-05-15 22:54:48 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-05-15 23:18:56 -0400 |
commit | b454f2c4c493b3edaefd6575bbce70cb52b4ad6e (patch) | |
tree | 1b3085ba1f8bbb1c93db34b0ab080225d75daf4b | |
parent | df116c73561cfb28e9d30e7b85eb4654a05ac901 (diff) | |
download | piem-b454f2c4c493b3edaefd6575bbce70cb52b4ad6e.tar.gz |
Makefile: Try to be more portable
This is my attempt to follow Chris Wellons's recommendations [*]. I'm
not sure how successful it is, but GNU make and bmake (from Debian)
seem happy.
[*] https://nullprogram.com/blog/2017/08/20/
https://nullprogram.com/blog/2020/01/22/
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 31 |
2 files changed, 16 insertions, 16 deletions
@@ -1,4 +1,3 @@ *-autoloads.el *.elc *.info -config.mk @@ -1,24 +1,23 @@ +.POSIX: --include config.mk - +EMACS = emacs # Rely on EMACSLOADPATH for everything but the current directory. -BATCH = emacs -Q --batch -L . +BATCH = $(EMACS) --batch -Q -L . + +EL = piem.el piem-b4.el piem-elfeed.el piem-eww.el piem-gnus.el \ + piem-notmuch.el +ELC = $(EL:.el=.elc) -all: loadpath piem.info piem.elc \ - piem-b4.elc piem-elfeed.elc piem-eww.elc \ - piem-gnus.elc piem-notmuch.elc +all: compile piem.info piem-autoloads.el + +compile: $(ELC) piem-autoloads.el: $(BATCH) -l package --eval \ '(package-generate-autoloads "piem" default-directory)' -.PHONY: clean clean: - $(RM) *.elc *-autoloads.el *.info - -.PHONY: loadpath -loadpath: - @echo ";;; EMACSLOADPATH=$(EMACSLOADPATH)" + rm -f piem.info piem-autoloads.el $(ELC) piem-b4.elc: piem-b4.el piem.elc piem-elfeed.elc: piem-elfeed.el piem.elc @@ -27,8 +26,10 @@ piem-gnus.elc: piem-gnus.el piem.elc piem-notmuch.elc: piem-notmuch.el piem.elc piem.elc: piem.el -%.info: %.texi - makeinfo $< +.SUFFIXES: .el .elc .texi .info -%.elc: %.el +.el.elc: $(BATCH) -f batch-byte-compile $< + +.texi.info: + makeinfo $< |