;;; -*-Emacs-Lisp-*- ;;; ;;; $Id: mk-tm,v 2.0 1995/09/04 00:50:39 morioka Exp morioka $ ;;; (setq load-path (append (mapcar (function (lambda (path) (expand-file-name path (getenv "PWD")) )) '("." "../tl/" "../mel/") ) load-path)) (require 'tl-misc) (require 'gnus) (require 'tm-rich) (setq tm-modules (append (cons (cond ((boundp 'NEMACS) "tm-nemacs" ) ((boundp 'MULE) "tm-mule" ) (t "tm-orig" )) '("signature" "tiny-mime" "tm-def" "tm-view" "tm-latex" "tm-rmail" "tm-comp" "tm-setup" "mime-setup" )) (if (not (string-match "\\(XEmacs\\|Lucid\\)" emacs-version)) (progn (cons (if (or (< emacs-major-version 19)(< emacs-minor-version 29)) "tinyrich" "richtext" ) '("tm-rich") ))) )) (setq tm-uncompile-el-files '("tm-partial.el")) (if (catch 'tag (let ((paths load-path) path) (while paths (setq path (expand-file-name "ange-ftp.el" (car paths))) (if (file-exists-p path) (throw 'tag path) ) (setq paths (cdr paths)) ))) (setq tm-modules (append tm-modules '("tm-ftp"))) (setq tm-uncompile-el-files (append tm-uncompile-el-files '("tm-ftp.el"))) ) (if (catch 'tag (let ((paths load-path) path) (while paths (setq path (expand-file-name "vm.el" (car paths))) (if (file-exists-p path) (throw 'tag path) ) (setq paths (cdr paths)) ))) (setq tm-modules (append tm-modules '("tm-vm"))) (setq tm-uncompile-el-files (append tm-uncompile-el-files '("tm-vm.el"))) ) (setq tm-el-files (mapcar (function (lambda (module) (concat module ".el") )) tm-modules)) (setq tm-elc-files (mapcar (function (lambda (module) (concat module ".elc") )) tm-modules)) (defun compile-tm () (mapcar (function byte-compile-file) tm-el-files) ) (defconst el-file-mode (+ (* 64 6)(* 8 4) 4)) (defun install-el (path file) (let ((full-path (expand-file-name file path))) (if (file-exists-p full-path) (set-file-modes full-path el-file-mode) ) (copy-file file full-path t t) (princ (format "%s -> %s\n" file path)) )) (defun install-el-files (path &rest files) (mapcar (function (lambda (file) (if (file-exists-p file) (install-el path file) ))) files)) (defun install-elc (path file) (let ((full-path (expand-file-name file path))) (copy-file file full-path t t) (delete-file file) (princ (format "%s -> %s\n" file path)) )) (defun install-elc-files (path &rest files) (mapcar (function (lambda (file) (if (file-exists-p file) (install-elc path file) ))) files)) (defun install-tm () (let ((path (car command-line-args-left))) (princ (format "%s\n" emacs-version)) (if (not (file-exists-p path)) (make-directory path t) ) (apply (function install-el-files) path (append tm-el-files tm-uncompile-el-files) ) (apply (function install-elc-files) path tm-elc-files) ))