tm 7.81.
[elisp/tm.git] / inst-tm
1 ;;; -*-Emacs-Lisp-*-
2 ;;;
3 ;;; $Id: inst-tm,v 7.30 1996/09/02 15:33:00 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 "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 install-tm-gnus ()
52   (erase-buffer)
53   (call-process SHELL
54                 nil t t
55                 SHELLOPTION
56                 (format
57                  TM_GNUS_INSTALL_FORMAT
58                  (car command-line-args) TM_GNUS_DIR)
59                 )
60   (princ (buffer-string))
61   )
62
63 (defun compile-tm ()
64   (print load-path)
65   (require 'mel-u)
66   (require 'tm-edit)
67   (load "rmailsum")
68   (require 'tm-mh-e)
69   (make-mime-setup TL_DIR TL_RELATIVE_DIR MU_RELATIVE_DIR
70                    MEL_RELATIVE_DIR TM_KERNEL_RELATIVE_DIR)
71   (compile-elisp-modules tl-modules             "../tl/")
72   (compile-elisp-modules mu-modules             "../mu/")
73   (compile-elisp-modules mel-modules            "../mel/")
74   (compile-elisp-modules tm-modules-to-compile  ".")
75   (compile-elisp-modules tm-mh-e-modules        "mh-e/")
76   (compile-elisp-module  'mime-setup            ".")
77   (save-excursion
78     (set-buffer (get-buffer-create TM_GNUS_COMPILE))
79     (let ((emacs (car command-line-args)))
80       (insert (format "cd gnus\n%s gnus EMACS=%s PWD=`pwd`\n" MAKE emacs))
81       (cond (running-xemacs-19_14-or-later
82              )
83             (running-xemacs
84              (insert (format "%s gnus5 EMACS=%s PWD=`pwd`\n" MAKE emacs))
85              )
86             (t (cond (running-emacs-18
87                       (insert (format "%s gnus3 EMACS=%s PWD=`pwd`\n"
88                                       MAKE emacs))
89                       (insert (format "%s gnus4 EMACS=%s PWD=`pwd`\n"
90                                       MAKE emacs))
91                       )
92                      ((<= emacs-minor-version 29)
93                       (insert (format "%s gnus4 EMACS=%s PWD=`pwd`\n"
94                                       MAKE emacs))
95                       (insert (format "%s gnus5 EMACS=%s PWD=`pwd`\n" 
96                                       MAKE emacs))
97                       )
98                      (t
99                       (insert (format "%s gnus5 EMACS=%s PWD=`pwd`\n" 
100                                       MAKE emacs))
101                       )))))
102     (write-file TM_GNUS_COMPILE)
103     ))
104
105 (defun install-tm ()
106   (princ (format "%s\n" emacs-version))
107   (print TL_DIR)
108   (install-elisp-modules tl-modules      "../tl/"       TL_DIR)
109   (install-elisp-modules mu-modules      "../mu/"       MU_DIR)
110   (install-elisp-modules mel-modules     "../mel/"      MEL_DIR)
111   (install-elisp-modules tm-modules      "./"           TM_KERNEL_DIR)
112   (install-elisp-modules tm-mh-e-modules "mh-e/"        TM_MHE_DIR)
113   (install-tm-gnus)
114   (install-elisp-modules '(mime-setup)   "./"   SETUP_FILE_DIR)
115   )
116
117 (defun install-execs ()
118   (install-files BINS       BIN_SRC_DIR    BIN_DIR)
119   (install-files METHODS METHOD_SRC_DIR METHOD_DIR nil t)
120   )
121
122 ;;; inst-tm ends here