]> git.eshelyaron.com Git - emacs.git/commitdiff
Build system now in generated makefile
authorPhillip Lord <phillip.lord@russet.org.uk>
Tue, 13 Sep 2016 21:50:45 +0000 (22:50 +0100)
committerPhillip Lord <phillip.lord@russet.org.uk>
Tue, 13 Sep 2016 21:50:45 +0000 (22:50 +0100)
.gitignore
lisp/emacs-lisp/package.el
packages/admin/package-build.el
packages/admin/package-makefile.el
packages/core/example/example.el [new file with mode: 0644]
packages/core/example2/example2.el [new file with mode: 0644]
packages/temp.el

index a81a515c724c2e90b20c342c388e7aa77fff3338..b644934cb615f66edf6397565e8498c8cac3ca8b 100644 (file)
@@ -142,7 +142,7 @@ src/stamp-h1
 *.res
 *.so
 [0-9]*.core
-core
+
 core.*[0-9]
 gmon.out
 oo/
index baaa5e2a186d9f26d20a2b8324373c89c902e688..cf0417bf8553dbc3b757465de609ab2e0ae56c19 100644 (file)
@@ -294,7 +294,7 @@ packages in `package-directory-list'."
            (push (expand-file-name "elpa" f) result)))
     (cons
      ;; And the inbuild ELPA directory
-     (concat (expand-file-name "../packages" data-directory))
+     (concat (expand-file-name "../packages/core" data-directory))
      (nreverse result)))
   "List of additional directories containing Emacs Lisp packages.
 Each directory name should be absolute.
index 05b246c57e8c070b874a5c04463316603777345a..71897a2b0dd58ace8d353e6424245debc3a7c7d6 100644 (file)
@@ -8,7 +8,7 @@
   (let ((descr
            (package-desc-create :name (make-symbol dir)))
           (location (package-build-dir dir)))
-      (archive--refresh-pkg-file location)
+      (archive-refresh-pkg-file location)
       (setq descr (package-load-descriptor location))
       (package-generate-autoloads (package-desc-name descr) location)
       (package-activate descr)
index 34f32d6949060b98e91d710d956e4a90eb34c891..ea8cece74bacfb74087d1a20795ddffbc3b3c925 100644 (file)
@@ -1,18 +1,6 @@
-(defvar package-makefile-archives
-  '("core")
-  "List of directories with packages in them.
-
-Directories can be either relative to the \"packages\" directory
-or absolute. The order is important because we want to only build
-packages which occur earlier in the list.")
-
-(defvar package-makefile--packages-seen nil
-  "List of packages we have already seen.")
-
 (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
@@ -27,24 +15,30 @@ packages which occur earlier in the list.")
    top-dir base-dir base-dir
    top-dir base-dir))
 
-(defun package-makefile--makefile-pkg-targets (top-dir)
+(defun package-makefile--makefile-pkg-targets (top-dir all-dirs)
   (concat
    "pkg-all: "
    (mapconcat
     'identity
-    (package-makefile--package-dirs top-dir) "" "-pkg ")
+    all-dirs
+    "-pkg ")
+   "-pkg"
    "\n\n"
    (mapconcat
     (lambda (base-dir)
       (package-makefile--target-pkg-el top-dir base-dir))
-    (package-makefile--package-dirs top-dir)
+    all-dirs
     "\n")))
 
+
+(defun package-makefile--core-packages ()
+  (package-makefile--package-dirs "core"))
+
 (defun package-makefile--makefile ()
-  (mapconcat
-   (lambda (top-dir)
-     (package-makefile--makefile-pkg-targets top-dir))
-   package-makefile-archives
+  (concat
+   (package-makefile--makefile-pkg-targets
+    "core"
+    (package-makefile--core-packages))
    "\n"))
 
 
@@ -52,7 +46,6 @@ packages which occur earlier in the list.")
   (with-temp-buffer
     (insert
      (package-makefile--makefile))
-    
     (write-file "gnumakefile-inc.mk")))
 
 ;; example: core/example/example-pkg.el
diff --git a/packages/core/example/example.el b/packages/core/example/example.el
new file mode 100644 (file)
index 0000000..9044b09
--- /dev/null
@@ -0,0 +1,14 @@
+;;; example.el --- An Example
+
+;;; Header:
+
+;; This file is not part of Emacs
+
+;; Author: Phillip Lord <phillip.lord@russet.org.uk>
+;; Maintainer: Phillip Lord <phillip.lord@russet.rg.uk>
+;; Version: 0.1
+
+;;;###autoload
+(defun example ()
+  (interactive)
+  (message "Hello from Example"))
diff --git a/packages/core/example2/example2.el b/packages/core/example2/example2.el
new file mode 100644 (file)
index 0000000..352078d
--- /dev/null
@@ -0,0 +1,14 @@
+;;; example2.el --- An Example
+
+;;; Header:
+
+;; This file is not part of Emacs
+
+;; Author: Phillip Lord <phillip.lord@russet.org.uk>
+;; Maintainer: Phillip Lord <phillip.lord@russet.rg.uk>
+;; Version: 0.1
+
+;;;###autoload
+(defun example2 ()
+  (interactive)
+  (message "Hello from Example2"))
index fb2399aafaa8b53cc38b93f882bb5895be806d84..23e7e801c0ef3cb176c2ae7b9a242ee3501809d0 100644 (file)
@@ -8,6 +8,4 @@
 
 (package-build-prepare "core/example")
 
-(defun temp ()
-  (interactive)
-  (package-makefile))
+(package-makefile)