0c1f5acf1e6e3f951c32b3069bab85864f4815cf
[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   (let ((dir (expand-file-name APEL_PREFIX
57                                (expand-file-name "lisp"
58                                                  PACKAGEDIR))))
59     (install-elisp-modules emu-modules  "." dir)
60     (install-elisp-modules apel-modules "." dir)
61     
62     (setq autoload-package-name "apel")
63     (add-to-list 'command-line-args-left dir)
64     (batch-update-directory)
65
66     (add-to-list 'command-line-args-left dir)
67     (Custom-make-dependencies)
68
69     (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
70     (byte-compile-file (expand-file-name "custom-load.el" dir))
71     ))
72
73 ;;; APEL-MK ends here