(install-apel-package): Compile emu-modules and apel-modules.
[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   (config-apel)
28   (load "EMU-ELS")
29   (load-file "APEL-ELS")
30   (compile-elisp-modules emu-modules    ".")
31   (compile-elisp-modules apel-modules   ".")
32   )
33
34 (defun install-apel ()
35   (compile-apel)
36   (install-elisp-modules emu-modules    "."     EMU_DIR)
37   (install-elisp-modules apel-modules   "."     APEL_DIR)
38   )
39
40 (defun config-apel-package ()
41   (let (package-dir)
42     (and (setq package-dir (car command-line-args-left))
43          (or (string= "NONE" package-dir)
44              (defvar PACKAGEDIR package-dir)
45              ))
46     (setq command-line-args-left (cdr command-line-args-left))
47     (load-file "APEL-CFG")
48     (load-file "APEL-ELS")
49                                           
50     (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))
51     ))
52
53 (defun install-apel-package ()
54   (config-apel-package)
55   (load "EMU-ELS")
56   
57   (compile-elisp-modules emu-modules    ".")
58   (compile-elisp-modules apel-modules   ".")
59   
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