legacy-dotfiles/emacs/Makefile

29 lines
816 B
Makefile
Raw Normal View History

2012-08-18 13:57:56 +02:00
EMACS = emacs
files = init.el init.elc eshell-init.el eshell-init.elc
install-files = $(addprefix install-,$(files)) install-loaddefs.el
2012-08-18 13:57:56 +02:00
submodules = eshell
install-submodules = $(addprefix install-,$(submodules))
.PHONY: all $(submodules) install $(install-submodules) $(install-files)
all: loaddefs.el $(files) $(submodules)
2012-08-18 13:57:56 +02:00
$(submodules):
$(MAKE) -C $@/
$(filter %.elc,$(files)): %.elc: %.el
$(EMACS) -batch -eval "(byte-compile-file \"$^\")"
loaddefs.el: $(files)
$(EMACS) -batch -eval "(let ((generated-autoload-file \"${CURDIR}/loaddefs.el\")) \
(update-directory-autoloads \"${CURDIR}\"))"
2012-08-18 13:57:56 +02:00
install: $(install-files) $(install-submodules)
$(install-files): install-%: $*
2012-08-18 13:57:56 +02:00
install -Dm 444 $* ${HOME}/.emacs.d/$*
$(install-submodules): install-%:
$(MAKE) -C $*/ install