(config-apel-package): New function.
[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 compile-apel-package ()
58   (config-apel-package)
59   (load "EMU-ELS")
60   (load-file "APEL-ELS")
61   
62   (setq autoload-package-name "apel")
63   (add-to-list 'command-line-args-left ".")
64   (batch-update-directory)
65
66   (add-to-list 'command-line-args-left ".")
67   (Custom-make-dependencies)
68
69   (compile-elisp-modules emu-modules    ".")
70   (compile-elisp-modules (append apel-modules
71                                  '(auto-autoloads custom-load))
72                          ".")
73   )
74
75 (defun install-apel-package ()
76   (config-apel-package)
77   (load "EMU-ELS")
78   (install-elisp-modules (append emu-modules
79                                  apel-modules
80                                  '(mime auto-autoloads custom-load))
81                          "./"
82                          (expand-file-name APEL_PREFIX
83                                            (expand-file-name "lisp"
84                                                              PACKAGEDIR)))
85   )
86
87 ;;; APEL-MK ends here