release.
[chise/tomoyo-tools.git] / TOMOYO-MK
1 ;;; -*-Emacs-Lisp-*-
2
3 ;; TOMOYO-MK: installer for TOMOYO.
4
5 ;;; Code:
6
7 (defun config-tomoyo-package ()
8   (let (package-dir)
9     (and (setq package-dir (car command-line-args-left))
10          (or (string= "NONE" package-dir)
11              (defvar PACKAGEDIR package-dir)
12              ))
13     (setq command-line-args-left (cdr command-line-args-left))
14     (load-file "TOMOYO-CFG")
15     (load-file "TOMOYO-ELS")
16                                           
17     (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))
18     ))
19
20 (defun compile-tomoyo-package ()
21   (config-tomoyo-package)
22
23   (setq autoload-package-name "tomoyo")
24   (add-to-list 'command-line-args-left ".")
25   (batch-update-directory)
26
27   (add-to-list 'command-line-args-left ".")
28   (Custom-make-dependencies)
29
30   (compile-elisp-modules (append tomoyo-modules-to-compile
31                                  '(auto-autoloads custom-load))
32                          ".")
33   )
34
35 (defun install-tomoyo-package ()
36   (config-tomoyo-package)
37   (install-elisp-modules (append tomoyo-modules
38                                  '(auto-autoloads custom-load))
39                          "./"
40                          (expand-file-name TOMOYO_PREFIX
41                                            (expand-file-name "lisp"
42                                                              PACKAGEDIR)))
43   (delete-file "./auto-autoloads.el")
44   (condition-case nil
45       (delete-file "./custom-load.el")
46     (error nil))
47   )
48
49 ;;; TOMOYO-MK ends here