emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/integrated-elpa 5a2fa7a 11/23: Lots of changes


From: Phillip Lord
Subject: [Emacs-diffs] feature/integrated-elpa 5a2fa7a 11/23: Lots of changes
Date: Fri, 16 Sep 2016 20:34:16 +0000 (UTC)

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

    Lots of changes
---
 packages/GNUmakefile               |    8 +++----
 packages/admin/package-makefile.el |   43 ++++++++++++++++++++++++++++++++++++
 packages/gnumakefile.mk            |    2 +-
 packages/temp.el                   |   11 +++++++++
 4 files changed, 58 insertions(+), 6 deletions(-)

diff --git a/packages/GNUmakefile b/packages/GNUmakefile
index d419b1d..4d97ed3 100644
--- a/packages/GNUmakefile
+++ b/packages/GNUmakefile
@@ -6,10 +6,9 @@ EMACS=../src/emacs
 
 DIRS=$(filter-out .,$(subst ./,,$(shell find . -maxdepth 1 -type d)))
 
-## alas "all" is an ELPA package, so this is going to break
-all: build-all
+## dependent on makefile
+all: pkg-all $(EMACS)
 
-build-all: $(DIRS) $(EMACS)
 
 
 # define package_template
@@ -31,8 +30,7 @@ build-all: $(DIRS) $(EMACS)
 
 # test: $(patsubst %,%-test,$(DIRS))
 
-include gnumakefile.mk
-
+include gnumakefile-inc.mk
 
 clean:
        find . -name "*pkg.el" -exec rm -v {} \;
diff --git a/packages/admin/package-makefile.el 
b/packages/admin/package-makefile.el
index c832350..34f32d6 100644
--- a/packages/admin/package-makefile.el
+++ b/packages/admin/package-makefile.el
@@ -12,6 +12,49 @@ packages which occur earlier in the list.")
 (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
+
+%s/%s/%s-pkg.el:
+\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
+   top-dir base-dir))
+
+(defun package-makefile--makefile-pkg-targets (top-dir)
+  (concat
+   "pkg-all: "
+   (mapconcat
+    'identity
+    (package-makefile--package-dirs top-dir) "" "-pkg ")
+   "\n\n"
+   (mapconcat
+    (lambda (base-dir)
+      (package-makefile--target-pkg-el top-dir base-dir))
+    (package-makefile--package-dirs top-dir)
+    "\n")))
+
+(defun package-makefile--makefile ()
+  (mapconcat
+   (lambda (top-dir)
+     (package-makefile--makefile-pkg-targets top-dir))
+   package-makefile-archives
+   "\n"))
+
+
+(defun package-makefile ()
+  (with-temp-buffer
+    (insert
+     (package-makefile--makefile))
+    
+    (write-file "gnumakefile-inc.mk")))
+
 ;; example: core/example/example-pkg.el
 ;; core/example/example-pkg.el
 ;;     $(EMACS) --batch --load package-build.el --eval '(package-build-prepare 
"core/example"")'
diff --git a/packages/gnumakefile.mk b/packages/gnumakefile.mk
index a6f350a..347f0da 100644
--- a/packages/gnumakefile.mk
+++ b/packages/gnumakefile.mk
@@ -3,4 +3,4 @@ example: core/example/example-pkg.el
 core/example/example-pkg.el:
        $(EMACS) --batch --directory=admin \
                --load admin/package-build.el \
-               --eval '(package-build-prepare "core/example"")'
+               --eval '(package-build-prepare "core/example")'
diff --git a/packages/temp.el b/packages/temp.el
index ccf0101..fb2399a 100644
--- a/packages/temp.el
+++ b/packages/temp.el
@@ -1,2 +1,13 @@
 (package-makefile--package-dirs "core")
 (package-makefile--package-dirs "/home/phillord/src/git/elpa/master/packages")
+
+
+(package-makefile--target-pkg-el "core" "example")
+(package-makefile--makefile-pkg-targets "core")
+(package-makefile--makefile)
+
+(package-build-prepare "core/example")
+
+(defun temp ()
+  (interactive)
+  (package-makefile))



reply via email to

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