3 ;; MU-MK: installer for mu-cite.
8 (let (prefix lisp-dir version-specific-lisp-dir)
9 (and (setq prefix (car command-line-args-left))
10 (or (string-equal "NONE" prefix)
11 (defvar PREFIX prefix)))
12 (setq command-line-args-left (cdr command-line-args-left))
13 (and (setq lisp-dir (car command-line-args-left))
14 (or (string-equal "NONE" lisp-dir)
15 (defvar LISPDIR lisp-dir)))
16 (setq command-line-args-left (cdr command-line-args-left))
17 (and (setq version-specific-lisp-dir (car command-line-args-left))
18 (or (string-equal "NONE" version-specific-lisp-dir)
20 (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)
21 (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n"
22 VERSION_SPECIFIC_LISPDIR)))))
23 (setq command-line-args-left (cdr command-line-args-left))
26 (princ (format "PREFIX=%s
27 LISPDIR=%s\n" PREFIX LISPDIR))))
31 (compile-elisp-modules mu-modules-to-compile "."))
35 (install-elisp-modules mu-modules "./" MU_DIR))
37 (defun config-mu-package ()
39 (and (setq package-dir (car command-line-args-left))
40 (or (string= "NONE" package-dir)
41 (defvar PACKAGEDIR package-dir)))
42 (setq command-line-args-left (cdr command-line-args-left))
45 (setq mu-modules-to-compile (append mu-modules-to-compile
46 '(auto-autoloads custom-load)))
47 (setq mu-modules (append mu-modules-to-compile
48 mu-modules-not-to-compile))
49 (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))))
51 (defun compile-mu-package ()
54 (if (fboundp 'batch-update-directory-autoloads)
55 ;; XEmacs 21.5.19 and newer.
57 (add-to-list 'command-line-args-left ".")
58 (add-to-list 'command-line-args-left "mu")
59 (batch-update-directory-autoloads))
60 (setq autoload-package-name "mu")
61 (add-to-list 'command-line-args-left ".")
62 (batch-update-directory))
64 (add-to-list 'command-line-args-left ".")
65 (Custom-make-dependencies)
67 (compile-elisp-modules mu-modules-to-compile "."))
69 (defun install-mu-package ()
71 (install-elisp-modules mu-modules
73 (expand-file-name MU_PREFIX
74 (expand-file-name "lisp"
77 (load "bytecomp" nil t)
79 (if (fboundp 'byte-compile-file-form-custom-declare-variable)
81 ;; Bind defcustom'ed variables when byte-compiling.
82 (put 'custom-declare-variable 'byte-hunk-handler
83 'byte-compile-file-form-custom-declare-variable)
84 (defun byte-compile-file-form-custom-declare-variable (form)
85 (if (memq 'free-vars byte-compile-warnings)
86 (setq byte-compile-bound-variables
87 (cons (nth 1 (nth 1 form)) byte-compile-bound-variables)))
90 (cond ((featurep 'xemacs)
92 (setq byte-compile-warnings
94 (copy-sequence byte-compile-default-warnings))))
95 ((and (boundp 'emacs-major-version)
96 (or (> emacs-major-version 20)
97 (and (eq emacs-major-version 20)
98 (>= emacs-minor-version 3))))
99 ;; Compiler macro for replacing `sref' with `aref'.
100 (put 'sref 'byte-optimizer
102 (cons 'aref (cdr form))))))