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/")
20 ;; Please specify Mailcrypt path.
21 (add-path "mailcrypt-3.4/")
25 (cond ((boundp 'NEMACS)
36 "tm-ew-d" "tm-parse" "tm-view" "tm-play" "tm-partial"
38 "tm-latex" "tm-html" "tm-tar" "tm-file"
42 "tm-setup" "mime-setup"
45 (setq tm-uncompile-el-files '("sc-setup.el"))
48 (let ((paths load-path) path)
50 (setq path (expand-file-name "ange-ftp.el" (car paths)))
51 (if (file-exists-p path)
54 (setq paths (cdr paths))
56 (setq tm-modules (append tm-modules '("tm-ftp")))
57 (setq tm-uncompile-el-files
58 (append tm-uncompile-el-files '("tm-ftp.el")))
62 (let ((paths load-path) path)
64 (setq path (expand-file-name "vm.elc" (car paths)))
65 (if (file-exists-p path)
68 (setq paths (cdr paths))
70 (setq tm-modules (append tm-modules '("tm-vm")))
71 (setq tm-uncompile-el-files
72 (append tm-uncompile-el-files '("tm-vm.el")))
76 (let ((paths load-path) path)
78 (setq path (expand-file-name "mailcrypt.el" (car paths)))
79 (if (file-exists-p path)
82 (setq paths (cdr paths))
84 (setq tm-modules (append tm-modules '("tm-pgp")))
85 (setq tm-uncompile-el-files
86 (append tm-uncompile-el-files '("tm-pgp.el")))
89 (if (and (file-exists-p "tm-evs.el")
93 (setq tm-modules (append tm-modules '("tm-evs")))
96 (if (string-match "XEmacs" emacs-version)
97 (setq tm-modules (append tm-modules '("tm-image")))
101 (mapcar (function (lambda (module)
102 (concat module ".el")
107 (mapcar (function (lambda (module)
108 (concat module ".elc")
120 (let ((el-file (concat module ".el"))
121 (elc-file (concat module ".elc"))
123 (if (file-newer-than-file-p el-file elc-file)
124 (byte-compile-file el-file)
130 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
132 (defun install-el (path file)
133 (let ((full-path (expand-file-name file path)))
134 (if (file-exists-p full-path)
135 (set-file-modes full-path el-file-mode)
137 (copy-file file full-path t t)
138 (princ (format "%s -> %s\n" file path))
141 (defun install-el-files (path &rest files)
142 (mapcar (function (lambda (file)
143 (if (file-exists-p file)
144 (install-el path file)
148 (defun install-elc (path file)
149 (let ((full-path (expand-file-name file path)))
150 (copy-file file full-path t t)
152 (princ (format "%s -> %s\n" file path))
155 (defun install-elc-files (path &rest files)
156 (mapcar (function (lambda (file)
157 (if (file-exists-p file)
158 (install-elc path file)
163 (let ((path (car command-line-args-left)))
164 (princ (format "%s\n" emacs-version))
165 (if (not (file-exists-p path))
166 (make-directory path t)
168 (apply (function install-el-files) path
169 (append tm-el-files tm-uncompile-el-files)
171 (apply (function install-elc-files) path tm-elc-files)
172 (setq command-line-args-left (cdr command-line-args-left))