X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=Makefile;h=e9cea433eba19d86066886c760621345d4ad8b98;hp=ac9c1c541396bddb64ba9864356de2380d731651;hb=595a76dcdb44e7ae7e6495b255ca0f0a2141d991;hpb=b93ddeaaac678fb92ebe5a9f1f37ca5b509047b5 diff --git a/Makefile b/Makefile index ac9c1c5..e9cea43 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,35 @@ include config.mk -.PHONY: all help info package clean +.PHONY: all autoloads clean compile help info package .SUFFIXES: .texi .info all: clean package +autoloads: $(PKG)-loaddefs.el + +compile: clean $(PKG).elc + help: - $(info make info - generate the info manual) - $(info make package - generate a tar file containing the package) - $(info make clean - remove generated files) + $(info make help - show brief help) + $(info make - generate a tar file containing the package) + $(info make all - ditto) + $(info make package - ditto) + $(info make info - generate the info manual) + $(info make compile - byte-compile the package lisp files) + $(info make autoloads - create $(PKG)-loaddefs.el to load Elpher in-place) + $(info make clean - remove generated files) @exit -.texi.info: +%.info: %.texi $(MAKEINFO) --no-split $< -o $@ +%.html: %.texi + $(MAKEINFO) --no-split --html $< -o $@ + +%.pdf: %.texi + $(MAKEINFO) --no-split --pdf $< -o $@ + dir: $(PKG).info $(INSTALLINFO) $? $@ @@ -29,4 +44,22 @@ $(PKG)-$(VERSION).tar: $(PKG).info dir *.el COPYING package: $(PKG)-$(VERSION).tar clean: + rm -f $(PKG).elc $(PKG)-loaddefs.el rm -f $(PKG).info dir $(PKG)-$(VERSION).tar + rm -f $(PKG).html $(PKG).pdf $(PKG).aux $(PKG).fn $(PKG).fns $(PKG).log $(PKG).toc + +define LOADDEFS_TPL +(add-to-list 'load-path (directory-file-name\n\ +........................(or (file-name-directory #$$) (car load-path)))) +endef +#' (ends emacs font-face garbage due to previous single quote) + +$(PKG)-loaddefs.el: + $(EMACS) -L $(PWD) \ + --eval "(setq-default backup-inhibited t)" \ + --eval "(setq generated-autoload-file \"$(PWD)/$@\")" \ + --eval "(update-directory-autoloads \"$(PWD)\")" + sed -i "s/^;;; Code:$$/;;; Code:\n\n$(subst ., ,$(LOADDEFS_TPL))/" $@ + +$(PKG).elc: + $(EMACS) -f batch-byte-compile $(@:.elc=.el)