3 ;;; $Id: mk-tm,v 7.4 1995/12/03 15:46:37 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.4beta/")
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")))
97 (mapcar (function (lambda (module)
103 (mapcar (function (lambda (module)
104 (concat module ".elc")
115 (let ((el-file (concat module ".el"))
116 (elc-file (concat module ".elc"))
118 (if (file-newer-than-file-p el-file elc-file)
119 (byte-compile-file el-file)
125 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
127 (defun install-el (path file)
128 (let ((full-path (expand-file-name file path)))
129 (if (file-exists-p full-path)
130 (set-file-modes full-path el-file-mode)
132 (copy-file file full-path t t)
133 (princ (format "%s -> %s\n" file path))
136 (defun install-el-files (path &rest files)
137 (mapcar (function (lambda (file)
138 (if (file-exists-p file)
139 (install-el path file)
143 (defun install-elc (path file)
144 (let ((full-path (expand-file-name file path)))
145 (copy-file file full-path t t)
147 (princ (format "%s -> %s\n" file path))
150 (defun install-elc-files (path &rest files)
151 (mapcar (function (lambda (file)
152 (if (file-exists-p file)
153 (install-elc path file)
158 (let ((path (car command-line-args-left)))
159 (princ (format "%s\n" emacs-version))
160 (if (not (file-exists-p path))
161 (make-directory path t)
163 (apply (function install-el-files) path
164 (append tm-el-files tm-uncompile-el-files)
166 (apply (function install-elc-files) path tm-elc-files)