]> git.eshelyaron.com Git - emacs.git/commitdiff
Lots of changes
authorPhillip Lord <phillip.lord@russet.org.uk>
Tue, 13 Sep 2016 15:53:11 +0000 (16:53 +0100)
committerPhillip Lord <phillip.lord@russet.org.uk>
Tue, 13 Sep 2016 15:53:11 +0000 (16:53 +0100)
packages/GNUmakefile
packages/admin/package-makefile.el
packages/gnumakefile.mk
packages/temp.el

index d419b1de475a9447772715e3e01bec0fa5d8c4c5..4d97ed32934e4847890904530cdf2a59f71480c1 100644 (file)
@@ -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 {} \;
index c83235099e4bd6d20e2a4f81e8a72c1fce10ca27..34f32d6949060b98e91d710d956e4a90eb34c891 100644 (file)
@@ -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"")'
index a6f350a227e7f59fdad895590f875384d8876a14..347f0da201fdb6ff96f63a020113d32491746c06 100644 (file)
@@ -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")'
index ccf0101cb31f805221932e32ce2729018ac6c381..fb2399aafaa8b53cc38b93f882bb5895be806d84 100644 (file)
@@ -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))