emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master d157167 258/271: Strip headers. Use make dependencies.


From: Jackson Ray Hamilton
Subject: [elpa] master d157167 258/271: Strip headers. Use make dependencies.
Date: Thu, 05 Feb 2015 18:31:47 +0000

branch: master
commit d157167af9f109c5a6c7dd7d862f48dde2ec139a
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Strip headers. Use make dependencies.
---
 Makefile                         |   13 +++++++------
 scripts/download-dependencies.el |    7 +++++++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 4c00db7..2d37cd6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
 EMACS = emacs
+DEPENDENCIES = libraries/ert-async.el libraries/js2-mode.el
 
 all: clean compile test
 
-bench:
+bench: ${DEPENDENCIES}
        ${EMACS} -Q \
        -L . \
        -L libraries \
@@ -10,20 +11,20 @@ bench:
        -l benchmark/context-coloring-benchmark \
        -f context-coloring-benchmark-run
 
-compile:
+compile: ${DEPENDENCIES}
        ${EMACS} -Q -batch \
        -L . \
        -L libraries \
        -f batch-byte-compile *.el libraries/*.el
 
 clean:
-       rm -f *.elc libraries/*.elc
+       rm -f *.elc libraries/*.elc ${DEPENDENCIES}
 
-deps:
+${DEPENDENCIES}:
        ${EMACS} -Q -batch \
        -l scripts/download-dependencies.el
 
-test:
+test: ${DEPENDENCIES}
        ${EMACS} -Q -batch \
        -L . \
        -L libraries \
@@ -33,4 +34,4 @@ test:
        -l test/context-coloring-test.el \
        -f ert-run-tests-batch-and-exit
 
-.PHONY: all bench compile clean deps test
+.PHONY: all bench compile clean test
diff --git a/scripts/download-dependencies.el b/scripts/download-dependencies.el
index 0734d77..37f243b 100644
--- a/scripts/download-dependencies.el
+++ b/scripts/download-dependencies.el
@@ -22,6 +22,12 @@
 (defun resolve-path (path)
   (expand-file-name path directory))
 
+(defun strip-headers ()
+  (goto-char 1)
+  (kill-paragraph 1) ; The headers are 1 paragraph. I hope.
+  (kill-line)        ; A line separates the headers from the file's content.
+  )
+
 (let ((files 
'("https://raw.githubusercontent.com/mooz/js2-mode/master/js2-mode.el";
                
"https://raw.githubusercontent.com/rejeep/ert-async.el/master/ert-async.el";)))
   (make-directory (resolve-path "../libraries") t)
@@ -30,4 +36,5 @@
            (destination (resolve-path (concat "../libraries/" basename))))
       (when (null (file-exists-p destination))
         (with-current-buffer (url-retrieve-synchronously file)
+          (strip-headers)
           (write-file destination))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]