3 ;;; $Id: mk-tm,v 7.7 1996/02/27 21:24:06 morioka Exp $
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 BBDB 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"))
51 (if (file-installed-p "ange-ftp.el")
52 (setq tm-modules (append tm-modules '("tm-ftp")))
53 (setq tm-uncompile-el-files
54 (append tm-uncompile-el-files '("tm-ftp.el")))
57 (if (file-installed-p "vm.elc")
58 (setq tm-modules (append tm-modules '("tm-vm")))
59 (setq tm-uncompile-el-files
60 (append tm-uncompile-el-files '("tm-vm.el")))
64 (let ((paths load-path) path)
66 (setq path (expand-file-name "mailcrypt.el" (car paths)))
67 (if (file-exists-p path)
70 (setq paths (cdr paths))
72 (setq tm-modules (append tm-modules '("tm-pgp")))
73 (setq tm-uncompile-el-files
74 (append tm-uncompile-el-files '("tm-pgp.el")))
78 (let ((paths load-path) path)
80 (setq path (expand-file-name "bbdb.el" (car paths)))
81 (if (file-exists-p path)
84 (setq paths (cdr paths))
86 (setq tm-modules (append tm-modules '("tm-bbdb")))
87 (setq tm-uncompile-el-files
88 (append tm-uncompile-el-files '("tm-bbdb.el")))
91 (if (and (file-exists-p "tm-evs.el")
95 (setq tm-modules (append tm-modules '("tm-evs")))
98 (if (string-match "XEmacs" emacs-version)
99 (setq tm-modules (append tm-modules '("tm-image")))
102 (let ((paths load-path) path)
104 (setq path (expand-file-name "bitmap.el" (car paths)))
105 (if (file-exists-p path)
108 (setq paths (cdr paths))
110 (setq tm-modules (append tm-modules '("tm-image")))
111 (setq tm-uncompile-el-files
112 (append tm-uncompile-el-files '("tm-image.el")))
116 (mapcar (function (lambda (module)
117 (concat module ".el")
122 (mapcar (function (lambda (module)
123 (concat module ".elc")
135 (let ((el-file (concat module ".el"))
136 (elc-file (concat module ".elc"))
138 (if (file-newer-than-file-p el-file elc-file)
139 (byte-compile-file el-file)
145 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
147 (defun install-el (path file)
148 (let ((full-path (expand-file-name file path)))
149 (if (file-exists-p full-path)
150 (set-file-modes full-path el-file-mode)
152 (copy-file file full-path t t)
153 (princ (format "%s -> %s\n" file path))
156 (defun install-el-files (path &rest files)
157 (mapcar (function (lambda (file)
158 (if (file-exists-p file)
159 (install-el path file)
163 (defun install-elc (path file)
164 (let ((full-path (expand-file-name file path)))
165 (copy-file file full-path t t)
167 (princ (format "%s -> %s\n" file path))
170 (defun install-elc-files (path &rest files)
171 (mapcar (function (lambda (file)
172 (if (file-exists-p file)
173 (install-elc path file)
178 (let ((path (car command-line-args-left)))
179 (princ (format "%s\n" emacs-version))
180 (if (not (file-exists-p path))
181 (make-directory path t)
183 (apply (function install-el-files) path
184 (append tm-el-files tm-uncompile-el-files)
186 (apply (function install-elc-files) path tm-elc-files)
187 (setq command-line-args-left (cdr command-line-args-left))