Abolish function `compile-apel-package'.
[elisp/apel.git] / APEL-MK
1 ;;; -*-Emacs-Lisp-*-
2
3 ;; APEL-MK: installer for APEL.
4
5 ;;; Code:
6
7 (defun config-apel ()
8   (let (prefix lisp-dir)
9     (and (setq prefix (car command-line-args-left))
10          (or (string-equal "NONE" prefix)
11              (defvar PREFIX prefix)
12              ))
13     (setq command-line-args-left (cdr command-line-args-left))
14     (and (setq lisp-dir (car command-line-args-left))
15          (or (string-equal "NONE" lisp-dir)
16              (defvar LISPDIR lisp-dir)
17              ))
18     (setq command-line-args-left (cdr command-line-args-left))
19     (load-file "APEL-CFG")
20     (or (boundp 'apel-modules)
21         (load-file "APEL-ELS")
22         )
23     (princ (format "PREFIX=%s\n" PREFIX))
24     ))
25
26 (defun compile-apel ()
27   ;;(add-to-list 'load-path (expand-file-name "../emu"))
28   ;;(add-to-list 'load-path ".")
29   ;;(require 'install)
30   (config-apel)
31   (load "EMU-ELS")
32   (load-file "APEL-ELS")
33   (compile-elisp-modules emu-modules    ".")
34   (compile-elisp-modules apel-modules   ".")
35   )
36
37 (defun install-apel ()
38   (compile-apel)
39   ;;(config-apel)
40   (install-elisp-modules emu-modules    "."     EMU_DIR)
41   (install-elisp-modules apel-modules   "."     APEL_DIR)
42   )
43
44 (defun config-apel-package ()
45   (let (package-dir)
46     (and (setq package-dir (car command-line-args-left))
47          (or (string= "NONE" package-dir)
48              (defvar PACKAGEDIR package-dir)
49              ))
50     (setq command-line-args-left (cdr command-line-args-left))
51     (load-file "APEL-CFG")
52     (load-file "APEL-ELS")
53                                           
54     (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))
55     ))
56
57 (defun install-apel-package ()
58   (config-apel-package)
59   (load "EMU-ELS")
60   (let ((dir (expand-file-name APEL_PREFIX
61                                (expand-file-name "lisp"
62                                                  PACKAGEDIR))))
63     (install-elisp-modules emu-modules  "." dir)
64     (install-elisp-modules apel-modules "." dir)
65     
66     (setq autoload-package-name "apel")
67     (add-to-list 'command-line-args-left dir)
68     (batch-update-directory)
69
70     (add-to-list 'command-line-args-left dir)
71     (Custom-make-dependencies)
72
73     (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
74     (byte-compile-file (expand-file-name "custom-load.el" dir))
75     ))
76
77 ;;; APEL-MK ends here