]> git.donarmstrong.com Git - org-ref.git/commitdiff
Modified the makefile to conforms better to the emacs lisp package
authorDevon Buchanan <devon@divinenephron.co.uk>
Tue, 3 Mar 2015 20:14:58 +0000 (20:14 +0000)
committerDevon Buchanan <devon@divinenephron.co.uk>
Tue, 3 Mar 2015 20:14:58 +0000 (20:14 +0000)
specification.

.gitignore
Cask
Makefile
org-ref-init.el [deleted file]
org-ref.org

index 00e3105a2318f93e7b28ef66bf0acdf72a8c0038..10e1479e88d2ff9e02ff5273530909bb68d211e9 100644 (file)
@@ -1,3 +1,3 @@
 *.el
 *.elc
-!org-ref-init.el
\ No newline at end of file
+/dist/
diff --git a/Cask b/Cask
index 2701a2b72aeec028b94d2aed76af4fa656ad6754..1ff38b4defaf96976aed09600387d62d3bc7aa79 100644 (file)
--- a/Cask
+++ b/Cask
@@ -1,9 +1,7 @@
 (source gnu)
 (source melpa)
 
-(package-file "org-ref-init.el")
-
-(files "*.el" "*.info" "*.org")
+(package-file "org-ref.el")
 
 (development
  (depends-on "ecukes")
index 601933829817bfe193514172adfcb19475132348..13a1f5a352caf95b9197ac7d5445998453a5e23a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
 EMACS ?= emacs
-CASK_EXEC ?= cask exec
+CASK ?= cask
+CASK_EXEC ?= ${CASK} exec
+ORG_SOURCES = doi-utils.org org-ref.org pubmed.org
+EL_TANGLED = ${ORG_SOURCES:.org=.el}
+EL_SOURCES = arxiv.el jmax-bibtex.el
+SOURCES =  ${EL_TANGLED} ${EL_SOURCES}
 
 all: test
 
@@ -15,4 +20,13 @@ compile:
 clean-elc:
        rm -f f.elc
 
-.PHONY:        all test
+clean-tangled:
+       rm ${EL_TANGLED}
+
+package : ${SOURCES}
+       ${CASK} package
+
+%.el: %.org
+       ${EMACS} -Q -batch $< -f org-babel-tangle
+
+.PHONY:        all test package clean-elc clean-tangled
diff --git a/org-ref-init.el b/org-ref-init.el
deleted file mode 100644 (file)
index 8f4733d..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-;;; org-ref-init.el --- cite and cross-reference in org-mode
-
-;; Copyright(C) 2014 John Kitchin
-
-;; Author: John Kitchin <jkitchin@andrew.cmu.edu>
-;; URL: https://github.com/jkitchin/org-ref
-;; Version: 0.1
-;; Keywords: org-mode, cite, ref, label
-;; Package-Requires: ((dash) (helm) (helm-bibtex))
-
-;; This file is not currently part of GNU Emacs.
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
-
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program ; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-;;
-;; Lisp code to setup bibliography cite, ref and label org-mode links.
-;; also sets up reftex and helm for org-mode citations. The links are
-;; clickable and do things that are useful. You should really read
-;; org-ref.org for details.
-;;
-
-;;; Code:
-
-(require 'cl)
-
-;; org path for loadable org-files
-(defvar org-ref-org-load-path
-  nil
-  "List of directories to find org-files that `org-babel-load-file' can load code from.")
-
-;; https://github.com/jkitchin/org-ref
-(defun org-ref-org-require (feature)
-  "Load a FEATURE from an org-file.
-FEATURE is a symbol, and it is loaded from an org-file by the name of FEATURE.org, that is in the `org-load-path'.  The FEATURE is loaded from `org-babel-load-file'."
-  (let ((org-file (concat (symbol-name feature) ".org"))
-       (path))
-
-    ;; find the org-file
-    (catch 'result
-      (loop for dir in org-ref-org-load-path do
-           (when (file-exists-p
-                  (setq path
-                        (expand-file-name
-                         org-file
-                         dir)))
-             (throw 'result path))))
-    (let ((default-directory (file-name-directory path)))
-      (org-babel-load-file path))))
-
-;; remember this directory
-(defconst org-ref-dir (file-name-directory (or load-file-name
-                                              (buffer-file-name)))
-    "Directory where org-ref is installed.")
-
-;; for loading org-files
-(add-to-list 'org-ref-org-load-path org-ref-dir)
-;; for loading emacs-lisp files
-(add-to-list 'load-path org-ref-dir)
-
-(org-ref-org-require 'org-ref)
-(org-ref-org-require 'doi-utils)
-(org-ref-org-require 'pubmed)
-(require 'jmax-bibtex)
-
-(provide 'org-ref-init)
-
-;;; org-ref-init.el ends here
index 9665744c85bcf662ef33af3e9fa5de3cd738bb73..6ecfc58b2ca1a6a64d23ddf6bbe348d02af17ade 100644 (file)
@@ -28,11 +28,16 @@ With helm integration (default) you can:
 
 ** Header
 #+BEGIN_SRC emacs-lisp :tangle org-ref.el
-;;; org-ref.el --- setup bibliography, cite, ref and label org-mode links.
+;;; org-ref.el --- cite and cross-reference in org-mode
 
 ;; Copyright(C) 2014 John Kitchin
 
 ;; Author: John Kitchin <jkitchin@andrew.cmu.edu>
+;; URL: https://github.com/jkitchin/org-ref
+;; Version: 0.1
+;; Keywords: org-mode, cite, ref, label
+;; Package-Requires: ((dash) (helm) (helm-bibtex))
+
 ;; This file is not currently part of GNU Emacs.
 
 ;; This program is free software; you can redistribute it and/or
@@ -52,11 +57,13 @@ With helm integration (default) you can:
 
 ;;; Commentary:
 ;;
-;; Lisp code to setup bibliography cite, ref and label org-mode links.  also
-;; sets up reftex and helm for org-mode citations. The links are clickable and
-;; do things that are useful. You should really read org-ref.org for details.
+;; Lisp code to setup bibliography cite, ref and label org-mode links.
+;; also sets up reftex and helm for org-mode citations. The links are
+;; clickable and do things that are useful. You should really read
+;; org-ref.org for details.
 ;;
-;; Package-Requires: ((dash) (helm) (helm-bibtex))
+
+;;; Code:
 #+END_SRC
 
 ** requires
@@ -3813,6 +3820,8 @@ _o_: Open entry   _e_: Email entry and pdf
 * End of code
 #+BEGIN_SRC emacs-lisp :tangle org-ref.el
 (provide 'org-ref)
+
+;;; org-ref.el ends here
 #+END_SRC
 
 * Build                                                                   :noexport: