org-download

a fork of abo-abo's org-download
git clone https://git.trogloxene.org/org-download.git
Log | Files | Refs | README

commit be976a00933b418943f1f62ee0054aa698abe81c
parent 055c92e56ac156dddd3185fd7d088d8b5a27e7d2
Author: Oleh Krehel <ohwoeowho@gmail.com>
Date:   Thu, 16 May 2019 15:19:36 +0200

Makefile: Add

Diffstat:
M.gitignore | 3+--
DCask | 9---------
AMakefile | 18++++++++++++++++++
Detc/elpa.el | 5-----
Atest/elpa.el | 4++++
Atest/make-update.el | 28++++++++++++++++++++++++++++
6 files changed, 51 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1 @@ -/Makefile -/init.el + diff --git a/Cask b/Cask @@ -1,9 +0,0 @@ -(source gnu) -(source melpa) - -(package-file "org-download.el") - -(files "org-download.el") - -(development - (depends-on "async")) diff --git a/Makefile b/Makefile @@ -0,0 +1,18 @@ +emacs ?= emacs +BEMACS = $(emacs) -batch -l test/elpa.el + +all: emacsq + +update: + emacs -batch -l test/make-update.el + +emacsq: + emacs -Q -l test/elpa.el -l org-download.el ~/test.org + +compile: + $(BEMACS) -batch $(LOAD) --eval "(byte-compile-file \"org-download.el\")" + +clean: + rm -f *.elc + +.PHONY: all update emacsq compile clean diff --git a/etc/elpa.el b/etc/elpa.el @@ -1,5 +0,0 @@ -(setq package-user-dir - (expand-file-name (format ".cask/%s/elpa" emacs-version))) -(package-initialize) -(add-to-list 'load-path default-directory) - diff --git a/test/elpa.el b/test/elpa.el @@ -0,0 +1,4 @@ +(setq package-user-dir + (expand-file-name (format "~/.elpa/%s/elpa" emacs-version))) +(package-initialize) +(add-to-list 'load-path default-directory) diff --git a/test/make-update.el b/test/make-update.el @@ -0,0 +1,28 @@ +;;* list of the all dependencies +(defvar dev-packages '(async)) + +;;* initialize package.el +(setq package-user-dir + (expand-file-name (format "~/.elpa/%s/elpa" emacs-version))) +(message "installing in %s ...\n" package-user-dir) +(package-initialize) +(setq package-archives + '(("melpa" . "https://melpa.org/packages/") + ("gnu" . "http://elpa.gnu.org/packages/"))) +(package-refresh-contents) + +;;* install dependencies +(dolist (package dev-packages) + (unless (package-installed-p package) + (ignore-errors + (package-install package)))) + +;;* upgrade dependencies +(save-window-excursion + (package-list-packages t) + (condition-case nil + (progn + (package-menu-mark-upgrades) + (package-menu-execute t)) + (error + (message "All packages up to date"))))