2012-08-18 13:57:56 +02:00
|
|
|
EMACS = emacs
|
|
|
|
|
2012-08-19 00:26:15 +02:00
|
|
|
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)
|
|
|
|
|
2012-08-19 00:26:15 +02:00
|
|
|
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 \"$^\")"
|
|
|
|
|
2012-08-19 00:26:15 +02:00
|
|
|
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)
|
|
|
|
|
2012-08-19 00:26:15 +02:00
|
|
|
$(install-files): install-%: $*
|
2012-08-18 13:57:56 +02:00
|
|
|
install -Dm 444 $* ${HOME}/.emacs.d/$*
|
|
|
|
|
|
|
|
$(install-submodules): install-%:
|
|
|
|
$(MAKE) -C $*/ install
|