emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/integrated-elpa 8b53bb8 14/23: Summarization happe


From: Phillip Lord
Subject: [Emacs-diffs] feature/integrated-elpa 8b53bb8 14/23: Summarization happening and some ELPA support
Date: Fri, 16 Sep 2016 20:34:16 +0000 (UTC)

branch: feature/integrated-elpa
commit 8b53bb8d90cd69144746684b190c84829ab579d6
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    Summarization happening and some ELPA support
---
 packages/GNUmakefile               |    2 +-
 packages/admin/assess-discover.el  |    3 +-
 packages/admin/package-build.el    |    4 +-
 packages/admin/package-makefile.el |  133 ++++++++++++++++++++++--------------
 packages/temp.el                   |    5 --
 5 files changed, 85 insertions(+), 62 deletions(-)

diff --git a/packages/GNUmakefile b/packages/GNUmakefile
index e1bc6f8..a19d361 100644
--- a/packages/GNUmakefile
+++ b/packages/GNUmakefile
@@ -11,7 +11,7 @@ DIRS=$(filter-out .,$(subst ./,,$(shell find . -maxdepth 1 
-type d)))
 ## dependent on makefile
 all: pkg-all $(EMACS)
 
-check: cleanlog check-packages
+check: cleanlog check-packages ert-summarize
 
 check-maybe: check-packages
 
diff --git a/packages/admin/assess-discover.el 
b/packages/admin/assess-discover.el
index cbbbfb3..3f07575 100644
--- a/packages/admin/assess-discover.el
+++ b/packages/admin/assess-discover.el
@@ -58,6 +58,5 @@ tests directory."
 
 (defun assess-discover-run-and-exit-batch-dir (directory &optional selector)
   (assess-discover--load-all-tests
-   (concat default-directory
-           directory))
+   (expand-file-name directory))
   (ert-run-tests-batch-and-exit selector))
diff --git a/packages/admin/package-build.el b/packages/admin/package-build.el
index 71897a2..48468e1 100644
--- a/packages/admin/package-build.el
+++ b/packages/admin/package-build.el
@@ -6,8 +6,8 @@
 ;; So this one does the business during build
 (defun package-build-prepare (dir)
   (let ((descr
-           (package-desc-create :name (make-symbol dir)))
-          (location (package-build-dir dir)))
+         (package-desc-create :name (make-symbol dir)))
+          (location (expand-file-name dir)))
       (archive-refresh-pkg-file location)
       (setq descr (package-load-descriptor location))
       (package-generate-autoloads (package-desc-name descr) location)
diff --git a/packages/admin/package-makefile.el 
b/packages/admin/package-makefile.el
index 0e42918..2f0086b 100644
--- a/packages/admin/package-makefile.el
+++ b/packages/admin/package-makefile.el
@@ -1,65 +1,66 @@
 (require 'seq)
 
+(defvar package-makefile--elpa nil)
+(defvar package-makefile--log-targets nil)
+(defvar package-makefile--pkg-targets nil)
+
 (defun package-makefile--package-dirs (directory)
   (directory-files directory nil "[^.].*"))
 
 (defun package-makefile--target-pkg-el (top-dir base-dir)
-  (format
-   "%s-pkg: %s/%s/%s-pkg.el
+  (let ((pkgfile (concat top-dir "/" base-dir "/" base-dir "-pkg.el")))
+    (add-to-list
+     'package-makefile--pkg-targets pkgfile)
+    (format
+     "%s-pkg: %s
 
-%s/%s/%s-pkg.el: %s
+%s: %s
 \t$(EMACS) --batch --directory=admin \\
 \t\t--load admin/package-build.el \\
 \t\t--eval '(package-build-prepare \"%s/%s\")'
 "
 
-   base-dir top-dir base-dir base-dir
-   top-dir base-dir base-dir
-   (mapconcat
-    (lambda (n)
-      (concat top-dir "/" base-dir "/" n))
-    (seq-remove
-     (lambda (n)
-       (or
-        (string-match-p
-         ".*-autoloads.el" n)
-        (string-match-p
-         ".*-pkg.el" n)))
-     (directory-files
-      (concat top-dir "/" base-dir)
-      nil
-      ".*el$"))
-    " ")
-   top-dir base-dir))
+     base-dir pkgfile
+     pkgfile
+     (mapconcat
+      (lambda (n)
+        (concat top-dir "/" base-dir "/" n))
+      (seq-remove
+       (lambda (n)
+         (or
+          (string-match-p
+           ".*-autoloads.el" n)
+          (string-match-p
+           ".*-pkg.el" n)))
+       (directory-files
+        (concat top-dir "/" base-dir)
+        nil
+        ".*el$"))
+      " ")
+     top-dir base-dir)))
 
 (defun package-makefile--pkg-targets (top-dir all-dirs)
-  (concat
-   "pkg-all: "
-   (mapconcat
-    'identity
-    all-dirs
-    "-pkg ")
-   "-pkg"
-   "\n\n"
-   (mapconcat
-    (lambda (base-dir)
-      (package-makefile--target-pkg-el top-dir base-dir))
-    all-dirs
-    "\n")))
+  (mapconcat
+   (lambda (base-dir)
+     (package-makefile--target-pkg-el top-dir base-dir))
+   all-dirs
+   "\n"))
 
 (defun package-makefile--log-target (top-dir base-dir)
   (let* ((fulldir (concat top-dir "/" base-dir))
          (filestem (concat top-dir "/" base-dir "/" base-dir))
          (logfile (concat filestem ".log"))
          (pkgfile (concat filestem "-pkg.el")))
+    (add-to-list
+     'package-makefile--log-targets logfile)
     (format
      "%s: %s
-       @$(EMACS) --batch --load admin/assess-discover.el \\
+       $(EMACS) --batch --load admin/assess-discover.el \\
                --eval '(assess-discover-run-and-exit-batch-dir \"%s\")' \\
                $(WRITE_LOG)
 
 %s:
-       test ! -f ./%s || mv ./%s ./%s~
+       test ! -f %s || mv %s %s~
        $(MAKE) %s WRITE_LOG=
 
 %s: %s
@@ -81,32 +82,60 @@
     (lambda (base-dir)
       (package-makefile--log-target top-dir base-dir))
     all-dirs
-    "\n")
-
-   "
-check-packages: "
+    "\n")))
 
+(defun package-makefile--check-packages-target (targets)
+  (concat
+    "check-packages: ")
    (mapconcat
     (lambda (base-dir)
       (concat top-dir "/" base-dir "/" base-dir ".log"))
     all-dirs
-    " ")))
+    " "))
 
 (defun package-makefile--core-packages ()
   (package-makefile--package-dirs "core"))
 
-(defun package-makefile--1 ()
-  (concat
-   (package-makefile--pkg-targets
-    "core"
-    (package-makefile--core-packages))
-   "\n"
-
-   (package-makefile--test-targets
-    "core"
-    (package-makefile--core-packages))
-   "\n"))
 
+(defun package-makefile--elpa-dirs (elpa-package-dir)
+  (seq-remove
+   (lambda (n)
+     (string= "elpa.rss" n))
+   (package-makefile--package-dirs elpa-package-dir)))
+
+
+(defun package-makefile--1 ()
+  (let ((package-makefile--log-targets nil)
+        (package-makefile--pkg-targets nil))
+    (concat
+     (package-makefile--pkg-targets
+      "core"
+      (package-makefile--core-packages))
+     "\n"
+
+     (package-makefile--test-targets
+      "core"
+      (package-makefile--core-packages))
+     "\n"
+
+     (when package-makefile--elpa
+       (package-makefile--pkg-targets
+        package-makefile--elpa
+        (package-makefile--elpa-dirs
+         package-makefile-0elpa))
+       "\n"
+
+       (package-makefile--test-targets
+        package-makefile--elpa
+        (package-makefile--elpa-dirs
+         package-makefile--elpa)))
+
+     "ert-summarize: " (mapconcat 'identity package-makefile--log-targets " ")
+     "\n\t$(EMACS) -l ert -f ert-summarize-tests-batch-and-exit $^\n\n"
+
+     "pkg-all: " (mapconcat 'identity package-makefile--pkg-targets " ")
+     "\n\n"
+     "check-packages: " (mapconcat 'identity package-makefile--log-targets " 
"))))
 
 (defun package-makefile ()
   (with-temp-buffer
diff --git a/packages/temp.el b/packages/temp.el
index 4763536..553b1ef 100644
--- a/packages/temp.el
+++ b/packages/temp.el
@@ -7,8 +7,3 @@
 (package-makefile--makefile)
 
 (package-build-prepare "core/example")
-
-(package-makefile--pkg-targets
- "/home/phillord/src/git/elpa-git/master/packages"
- (package-makefile--package-dirs
-  "/home/phillord/src/git/elpa-git/master/packages"))



reply via email to

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