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 (append mu-modules
46 '(auto-autoloads custom-load)))
47 (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))))
49 (defun compile-mu-package ()
52 (setq autoload-package-name "mu")
53 (add-to-list 'command-line-args-left ".")
54 (batch-update-directory)
56 (add-to-list 'command-line-args-left ".")
57 (Custom-make-dependencies)
59 (compile-elisp-modules mu-modules "."))
61 (defun install-mu-package ()
63 (install-elisp-modules mu-modules
65 (expand-file-name MU_PREFIX
66 (expand-file-name "lisp"
69 (load "bytecomp" nil t)
71 (if (fboundp 'byte-compile-file-form-custom-declare-variable)
73 ;; Bind defcustom'ed variables when byte-compiling.
74 (put 'custom-declare-variable 'byte-hunk-handler
75 'byte-compile-file-form-custom-declare-variable)
76 (defun byte-compile-file-form-custom-declare-variable (form)
77 (if (memq 'free-vars byte-compile-warnings)
78 (setq byte-compile-bound-variables
79 (cons (nth 1 (nth 1 form)) byte-compile-bound-variables)))
82 (cond ((featurep 'xemacs)
84 (setq byte-compile-warnings
86 (copy-sequence byte-compile-default-warnings))))
87 ((and (boundp 'emacs-major-version)
88 (or (> emacs-major-version 20)
89 (and (eq emacs-major-version 20)
90 (>= emacs-minor-version 3))))
91 ;; Compiler macro for replacing `sref' with `aref'.
92 (put 'sref 'byte-optimizer
94 (cons 'aref (cdr form))))))