25 lines
568 B
Makefile
25 lines
568 B
Makefile
|
EMACS = emacs
|
||
|
|
||
|
files = init.el init.elc
|
||
|
install-files = $(addprefix install-,$(files))
|
||
|
submodules = eshell
|
||
|
install-submodules = $(addprefix install-,$(submodules))
|
||
|
|
||
|
.PHONY: all $(submodules) install $(install-submodules) $(install-files)
|
||
|
|
||
|
all: $(files) $(submodules)
|
||
|
|
||
|
$(submodules):
|
||
|
$(MAKE) -C $@/
|
||
|
|
||
|
$(filter %.elc,$(files)): %.elc: %.el
|
||
|
$(EMACS) -batch -eval "(byte-compile-file \"$^\")"
|
||
|
|
||
|
install: $(install-files) $(install-submodules)
|
||
|
|
||
|
$(install-files): install-%:
|
||
|
install -Dm 444 $* ${HOME}/.emacs.d/$*
|
||
|
|
||
|
$(install-submodules): install-%:
|
||
|
$(MAKE) -C $*/ install
|