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/")
22 (cond ((boundp 'NEMACS)
33 "tm-ew-d" "tm-parse" "tm-view" "tm-play" "tm-partial"
35 "tm-latex" "tm-html" "tm-tar" "tm-file"
39 "tm-setup" "mime-setup"
42 (setq tm-uncompile-el-files '("sc-setup.el"))
45 (let ((paths load-path) path)
47 (setq path (expand-file-name "ange-ftp.el" (car paths)))
48 (if (file-exists-p path)
51 (setq paths (cdr paths))
53 (setq tm-modules (append tm-modules '("tm-ftp")))
54 (setq tm-uncompile-el-files
55 (append tm-uncompile-el-files '("tm-ftp.el")))
59 (let ((paths load-path) path)
61 (setq path (expand-file-name "vm.elc" (car paths)))
62 (if (file-exists-p path)
65 (setq paths (cdr paths))
67 (setq tm-modules (append tm-modules '("tm-vm")))
68 (setq tm-uncompile-el-files
69 (append tm-uncompile-el-files '("tm-vm.el")))
72 (if (and (file-exists-p "tm-evs.el")
76 (setq tm-modules (append tm-modules '("tm-evs")))
80 (mapcar (function (lambda (module)
86 (mapcar (function (lambda (module)
87 (concat module ".elc")
98 (let ((el-file (concat module ".el"))
99 (elc-file (concat module ".elc"))
101 (if (file-newer-than-file-p el-file elc-file)
102 (byte-compile-file el-file)
108 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
110 (defun install-el (path file)
111 (let ((full-path (expand-file-name file path)))
112 (if (file-exists-p full-path)
113 (set-file-modes full-path el-file-mode)
115 (copy-file file full-path t t)
116 (princ (format "%s -> %s\n" file path))
119 (defun install-el-files (path &rest files)
120 (mapcar (function (lambda (file)
121 (if (file-exists-p file)
122 (install-el path file)
126 (defun install-elc (path file)
127 (let ((full-path (expand-file-name file path)))
128 (copy-file file full-path t t)
130 (princ (format "%s -> %s\n" file path))
133 (defun install-elc-files (path &rest files)
134 (mapcar (function (lambda (file)
135 (if (file-exists-p file)
136 (install-elc path file)
141 (let ((path (car command-line-args-left)))
142 (princ (format "%s\n" emacs-version))
143 (if (not (file-exists-p path))
144 (make-directory path t)
146 (apply (function install-el-files) path
147 (append tm-el-files tm-uncompile-el-files)
149 (apply (function install-elc-files) path tm-elc-files)