3 ;;; $Id: mk-tm,v 7.6 1995/12/25 05:33:36 morioka Exp morioka $
6 (setq load-path (append
9 (expand-file-name path (getenv "PWD"))
11 '("." "../tl/" "../mel/")
17 ;; Please specify VM path.
18 (add-path "vm-5.95beta/" 'all-paths)
20 ;; Please specify Mailcrypt path.
21 (add-path "mailcrypt-3.4/" 'all-paths)
23 ;; Please specify Mailcrypt path.
24 (add-path "bbdb-1.50/" 'all-paths)
29 (cond ((boundp 'NEMACS)
40 "tm-ew-d" "tm-parse" "tm-view" "tm-play" "tm-partial"
42 "tm-latex" "tm-html" "tm-tar" "tm-file"
46 "tm-setup" "mime-setup"
49 (setq tm-uncompile-el-files '("sc-setup.el"))
52 (let ((paths load-path) path)
54 (setq path (expand-file-name "ange-ftp.el" (car paths)))
55 (if (file-exists-p path)
58 (setq paths (cdr paths))
60 (setq tm-modules (append tm-modules '("tm-ftp")))
61 (setq tm-uncompile-el-files
62 (append tm-uncompile-el-files '("tm-ftp.el")))
66 (let ((paths load-path) path)
68 (setq path (expand-file-name "vm.elc" (car paths)))
69 (if (file-exists-p path)
72 (setq paths (cdr paths))
74 (setq tm-modules (append tm-modules '("tm-vm")))
75 (setq tm-uncompile-el-files
76 (append tm-uncompile-el-files '("tm-vm.el")))
80 (let ((paths load-path) path)
82 (setq path (expand-file-name "mailcrypt.el" (car paths)))
83 (if (file-exists-p path)
86 (setq paths (cdr paths))
88 (setq tm-modules (append tm-modules '("tm-pgp")))
89 (setq tm-uncompile-el-files
90 (append tm-uncompile-el-files '("tm-pgp.el")))
94 (let ((paths load-path) path)
96 (setq path (expand-file-name "bbdb.el" (car paths)))
97 (if (file-exists-p path)
100 (setq paths (cdr paths))
102 (setq tm-modules (append tm-modules '("tm-bbdb")))
103 (setq tm-uncompile-el-files
104 (append tm-uncompile-el-files '("tm-bbdb.el")))
107 (if (and (file-exists-p "tm-evs.el")
111 (setq tm-modules (append tm-modules '("tm-evs")))
114 (if (string-match "XEmacs" emacs-version)
115 (setq tm-modules (append tm-modules '("tm-image")))
118 (let ((paths load-path) path)
120 (setq path (expand-file-name "bitmap.el" (car paths)))
121 (if (file-exists-p path)
124 (setq paths (cdr paths))
126 (setq tm-modules (append tm-modules '("tm-image")))
127 (setq tm-uncompile-el-files
128 (append tm-uncompile-el-files '("tm-image.el")))
132 (mapcar (function (lambda (module)
133 (concat module ".el")
138 (mapcar (function (lambda (module)
139 (concat module ".elc")
151 (let ((el-file (concat module ".el"))
152 (elc-file (concat module ".elc"))
154 (if (file-newer-than-file-p el-file elc-file)
155 (byte-compile-file el-file)
161 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
163 (defun install-el (path file)
164 (let ((full-path (expand-file-name file path)))
165 (if (file-exists-p full-path)
166 (set-file-modes full-path el-file-mode)
168 (copy-file file full-path t t)
169 (princ (format "%s -> %s\n" file path))
172 (defun install-el-files (path &rest files)
173 (mapcar (function (lambda (file)
174 (if (file-exists-p file)
175 (install-el path file)
179 (defun install-elc (path file)
180 (let ((full-path (expand-file-name file path)))
181 (copy-file file full-path t t)
183 (princ (format "%s -> %s\n" file path))
186 (defun install-elc-files (path &rest files)
187 (mapcar (function (lambda (file)
188 (if (file-exists-p file)
189 (install-elc path file)
194 (let ((path (car command-line-args-left)))
195 (princ (format "%s\n" emacs-version))
196 (if (not (file-exists-p path))
197 (make-directory path t)
199 (apply (function install-el-files) path
200 (append tm-el-files tm-uncompile-el-files)
202 (apply (function install-elc-files) path tm-elc-files)
203 (setq command-line-args-left (cdr command-line-args-left))