tm 7.82.
[elisp/tm.git] / inst-tm
1 ;;; -*-Emacs-Lisp-*-
2 ;;;
3 ;;; $Id: inst-tm,v 7.34 1996/09/04 15:43:19 morioka Exp $
4 ;;;
5
6 (load-file "TM-CFG")
7 (load-file "../tl/TL-ELS")
8 (load-file "../mu/MU-ELS")
9 (load-file "../mel/MEL-ELS")
10 (load-file "TM-ELS")
11 (load-file "../tm-mh-e/TMH-ELS")
12
13 (defun make-mime-setup (tl-absolute-path tl-path mu-path mel-path tm-path)
14   (let ((buf (find-file "mime-setup.el.in")))
15     (goto-char (point-min))
16     (re-search-forward "^;;; Code:" nil t)
17     (setq buffer-read-only nil)
18
19     ;; generate tl setting
20     (if (member tl-absolute-path default-load-path)
21         (insert "\n(require \'tl-misc)")
22       (insert
23        (format "
24
25 \(let ((load-path
26        (cons \"%s\"
27              load-path)))
28   (require \'tl-misc)
29   )
30 \(add-path \"%s\")" tl-absolute-path tl-path))
31       )
32     
33     ;; generate MU load-path setting
34     (or (member mu-path default-load-path)
35         (insert (format "\n(add-path \"%s\")" mu-path)))
36     
37     ;; generate MEL load-path setting
38     (or (member mel-path default-load-path)
39         (insert (format "\n(add-path \"%s\")" mel-path)))
40     
41     ;; generate tm load-path setting
42     (or (member tm-path default-load-path)
43         (insert (format "\n(add-path \"%s\")" tm-path)))
44     
45     ;; generate tm external-methods path setting
46     (insert
47      (format "\n(defvar mime-viewer/external-progs \"%s\")" METHOD_DIR))
48     (write-file "mime-setup.el")
49     ))
50
51 (defun compile-tm ()
52   (print load-path)
53   (require 'mel-u)
54   (require 'tm-edit)
55   (load "rmailsum")
56   (require 'tm-mh-e)
57   (make-mime-setup TL_DIR TL_RELATIVE_DIR MU_RELATIVE_DIR
58                    MEL_RELATIVE_DIR TM_KERNEL_RELATIVE_DIR)
59   (compile-elisp-modules tl-modules             "../tl")
60   (compile-elisp-modules mu-modules             "../mu")
61   (compile-elisp-modules mel-modules            "../mel")
62   (compile-elisp-modules tm-modules-to-compile  ".")
63   (compile-elisp-modules tm-mh-e-modules        "../tm-mh-e")
64   (compile-elisp-module  'mime-setup            ".")
65   (require 'gnus)
66   (cond ((featurep 'gnus-ems)
67          (load "../gnus-mime/Gnus-MIME-ELS")
68          (compile-elisp-modules gnus-mime-modules-to-compile "../gnus-mime")
69          )
70         (t
71          (load "../tm-gnus/TGNUS-ELS")
72          (compile-elisp-modules tm-gnus-modules-to-compile "../tm-gnus")
73          ))
74   )
75
76 (defun install-tm ()
77   (princ (format "%s\n" emacs-version))
78   (print TL_DIR)
79   (install-elisp-modules tl-modules      "../tl"        TL_DIR)
80   (install-elisp-modules mu-modules      "../mu"        MU_DIR)
81   (install-elisp-modules mel-modules     "../mel"       MEL_DIR)
82   (install-elisp-modules tm-modules      "."            TM_KERNEL_DIR)
83   (install-elisp-modules tm-mh-e-modules "../tm-mh-e"   TM_MHE_DIR)
84   ;;(install-tm-gnus)
85   (require 'gnus)
86   (cond ((featurep 'gnus-ems)
87          (load "../gnus-mime/Gnus-MIME-ELS")
88          (install-elisp-modules gnus-mime-modules
89                                 "../gnus-mime" Gnus_MIME_DIR)
90          )
91         (t
92          (load "../tm-gnus/TGNUS-ELS")
93          (install-elisp-modules tm-gnus-modules "../tm-gnus" TM_GNUS_DIR)
94          ))
95   (install-elisp-modules '(mime-setup)   "."    SETUP_FILE_DIR)
96   )
97
98 (defun install-execs ()
99   (install-files BINS       BIN_SRC_DIR    BIN_DIR)
100   (install-files METHODS METHOD_SRC_DIR METHOD_DIR nil t)
101   )
102
103 ;;; inst-tm ends here