3 ;; APEL-MK: installer for APEL.
7 (defun install-just-print-p ()
8 (let ((flag (getenv "MAKEFLAGS"))
10 (princ (format "%s\n" flag))
12 (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag)
15 (defun install-update-package-files (package dir &optional just-print)
17 (princ (format "Updating autoloads in directory %s..\n\n" dir))
19 (princ (format "Processing %s\n" dir))
20 (princ "Generating custom-load.el...\n\n")
22 (princ (format "Compiling %s...\n"
23 (expand-file-name "auto-autoloads.el" dir)))
24 (princ (format "Wrote %s\n"
25 (expand-file-name "auto-autoloads.elc" dir)))
27 (princ (format "Compiling %s...\n"
28 (expand-file-name "custom-load.el" dir)))
29 (princ (format "Wrote %s\n"
30 (expand-file-name "custom-load.elc" dir)))
33 (setq autoload-package-name package)
34 (add-to-list 'command-line-args-left dir)
35 (batch-update-directory)
37 (add-to-list 'command-line-args-left dir)
38 (Custom-make-dependencies)
40 (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
41 (byte-compile-file (expand-file-name "custom-load.el" dir))
45 (let (prefix lisp-dir version-specific-lisp-dir)
46 (and (setq prefix (car command-line-args-left))
47 (or (string-equal "NONE" prefix)
48 (defvar PREFIX prefix)
50 (setq command-line-args-left (cdr command-line-args-left))
51 (and (setq lisp-dir (car command-line-args-left))
52 (or (string-equal "NONE" lisp-dir)
53 (defvar LISPDIR lisp-dir)
55 (setq command-line-args-left (cdr command-line-args-left))
56 (and (setq version-specific-lisp-dir (car command-line-args-left))
57 (or (string-equal "NONE" version-specific-lisp-dir)
59 (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)
60 (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n"
61 VERSION_SPECIFIC_LISPDIR)))
63 (setq command-line-args-left (cdr command-line-args-left))
64 (load-file "APEL-CFG")
65 (or (boundp 'apel-modules)
66 (load-file "APEL-ELS")
68 (princ (format "PREFIX=%s\n" PREFIX))
71 (defun compile-apel ()
74 (load-file "APEL-ELS")
75 (compile-elisp-modules emu-modules ".")
76 (compile-elisp-modules apel-modules ".")
79 (defun install-apel ()
81 (let ((just-print (install-just-print-p)))
82 (install-elisp-modules emu-modules "." EMU_DIR just-print)
83 (install-elisp-modules apel-modules "." APEL_DIR just-print)
86 (defun config-apel-package ()
88 (and (setq package-dir (car command-line-args-left))
89 (or (string= "NONE" package-dir)
90 (defvar PACKAGEDIR package-dir)
92 (setq command-line-args-left (cdr command-line-args-left))
93 (load-file "APEL-CFG")
94 (load-file "APEL-ELS")
97 (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))
100 (defun compile-apel-package ()
101 (config-apel-package)
102 (compile-elisp-modules emu-modules ".")
103 (compile-elisp-modules apel-modules ".")
106 (defun install-apel-package ()
107 (config-apel-package)
108 (let ((just-print (install-just-print-p))
109 (dir (expand-file-name APEL_PREFIX
110 (expand-file-name "lisp" PACKAGEDIR))))
111 (install-elisp-modules emu-modules "." dir just-print)
112 (install-elisp-modules apel-modules "." dir just-print)
113 (install-update-package-files "apel" dir just-print)
116 (defun what-where-apel ()
118 (load-file "EMU-ELS")
120 The files that belong to the EMU modules:
124 The files that belong to the APEL modules:
128 (mapconcat 'symbol-name emu-modules ", ")
130 (mapconcat 'symbol-name apel-modules ", ")
133 ;;; APEL-MK ends here