diff --git a/Makefile b/Makefile index 254db560e..6a00fdb2d 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,20 @@ EMACS=emacs -all: install update +all: update -install: +update: + git pull @cask install - -update: install autoloads @cask update -compile: - @cask exec ${EMACS} --script scripts/byte-compile.el - clean: clean-extras - @rm -f init.elc init-load-path.elc {core,modules,private,contrib}/*.elc {core,modules}/lib/*.elc + @rm -f *.elc {core,modules,private,contrib}/*.elc {core,modules}/lib/*.elc clean-extras: @rm -rf auto-save-list recentf places ido.last async-bytecomp.log elpa projectile-bookmarks.eld projectile.cache company-statistics-cache.el tramp smex-items semanticdb autoloads: - @rm -rf core/autoloads.el - @cask exec ${EMACS} --script scripts/generate-autoloads.el + @emacs --script scripts/generate-autoloads.el + +compile: autoloads + @emacs --script scripts/byte-compile.el diff --git a/scripts/byte-compile.el b/scripts/byte-compile.el new file mode 100755 index 000000000..7d64dd8c6 --- /dev/null +++ b/scripts/byte-compile.el @@ -0,0 +1,18 @@ +#!emacs --script + +(load (concat user-emacs-directory "init.el")) + +(require 'bytecomp) +(byte-recompile-file (expand-file-name "init-load-path.el" narf-emacs-dir) nil 0) +(byte-recompile-file (expand-file-name "init.el" narf-emacs-dir) nil 0) +(byte-recompile-file (expand-file-name "core.el" narf-core-dir) t 0) +(byte-recompile-file (expand-file-name "core-vars.el" narf-core-dir) t 0) +(byte-recompile-file (expand-file-name "core-defuns.el" narf-core-dir) t 0) +(dolist (dir (append (list narf-core-dir narf-contrib-dir) + (list (concat narf-modules-dir "lib/") + (concat narf-core-dir "lib/") + narf-modules-dir))) + (byte-recompile-directory dir 0 nil)) + +(byte-recompile-file (expand-file-name "my-bindings.el" narf-core-dir) t 0) +(byte-recompile-file (expand-file-name "my-commands.el" narf-core-dir) t 0) diff --git a/scripts/generate-autoloads.el b/scripts/generate-autoloads.el index ec2d1a262..ee0737568 100755 --- a/scripts/generate-autoloads.el +++ b/scripts/generate-autoloads.el @@ -1,6 +1,5 @@ #!emacs --script -(setq user-emacs-directory (concat (file-name-directory load-file-name) "../")) (load (concat user-emacs-directory "init-load-path.el")) (require 'f)