X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=TM-CFG;h=5cb2d4fd016334d2fde66958048b1d07e3293bfd;hb=d26bc385edbd0d6d6abdcdaf7fb011296ff7eba8;hp=6fd805217b0eeb2bbeddba07ee97796d5dfecaf1;hpb=80871efc12c5b65a0780f0084c087076eb3bcbc8;p=elisp%2Ftm.git diff --git a/TM-CFG b/TM-CFG index 6fd8052..5cb2d4f 100644 --- a/TM-CFG +++ b/TM-CFG @@ -1,8 +1,9 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: TM-CFG,v 6.0 1996/05/11 10:33:20 morioka Exp morioka $ +;;; $Id: TM-CFG,v 7.1 1996/05/27 15:09:09 morioka Exp morioka $ ;;; +(defvar default-load-path load-path) (setq load-path (append (mapcar (function (lambda (path) @@ -42,9 +43,20 @@ ;;; ;; Please specify install path prefix. -;;(setq PREFIX "~/") ; install to you home directory -(setq PREFIX "/usr/local/") ; install to shared directory -;;(setq PREFIX "/lab/local/") +(setq PREFIX + (if (or running-emacs-18 running-xemacs) + (expand-file-name "../../.." exec-directory) + (expand-file-name "../../../.." data-directory) + )) ; install to shared directory (maybe "/usr/local") +;;(setq PREFIX "~/") ; install to your home directory + +;; Please specify install path prefix for binaries. +(setq EXEC_PREFIX + (if (or running-emacs-18 running-xemacs) + (expand-file-name "../../.." exec-directory) + (expand-file-name "../../../.." exec-directory) + )) +;;(setq EXEC_PREFIX "~/") ; install to your home directory ;; Please specify tm package prefix [optional] (setq TM_PACKAGE_PREFIX "") @@ -91,7 +103,7 @@ ;;; ;; Please specify binary path. -(defvar BIN_DIR (expand-file-name "bin" PREFIX)) +(defvar BIN_DIR (expand-file-name "bin" EXEC_PREFIX)) ;; Please specify binary path. (for external method scripts) (setq METHOD_DIR (expand-file-name "share/tm" PREFIX)) @@ -102,36 +114,45 @@ ;;; @ optional settings ;;; -(setq EMACS_PREFIX - (cond ((boundp 'NEMACS) "nemacs") - ((boundp 'MULE) "mule") - ((string-match "XEmacs" emacs-version) "xemacs") - (t "emacs") - )) - -(setq DATA_PREFIX - (if (or (< emacs-major-version 19) - (< emacs-minor-version 29) - ) - "lib" - "share")) - -(setq DATADIR (expand-file-name DATA_PREFIX PREFIX)) - (setq LISP_PREFIX (if (>= emacs-major-version 19) "site-lisp" "local.lisp")) -(setq EMACS_DATADIR (expand-file-name EMACS_PREFIX DATADIR)) - -(defvar LISPDIR (expand-file-name LISP_PREFIX EMACS_DATADIR)) - +(setq PATTERN-TO-INSTALL + (expand-file-name (concat ".*/" LISP_PREFIX) PREFIX)) +(setq PATTERN-TO-AVOID + (format "%d\\.%s" emacs-major-version emacs-minor-version)) + +(defvar LISPDIR + (or + (catch 'tag + (let ((rest default-load-path) + dir) + (while (setq dir (car rest)) + (or (string-match PATTERN-TO-AVOID dir) + (if (string-match PATTERN-TO-INSTALL dir) + (throw 'tag (substring dir 0 (match-end 0))) + )) + (setq rest (cdr rest)) + ))) + (expand-file-name (concat + (if running-emacs-19 + "share/" + "lib/") + (cond ((boundp 'NEMACS) "nemacs/") + ((boundp 'MULE) "mule/") + (running-xemacs + (if (featurep 'mule) + "xmule/" + "xemacs/")) + (t "emacs/")) + LISP_PREFIX) PREFIX) + )) ;; Please specify mime-setup.{el|elc} install path. (setq SETUP_FILE_DIR LISPDIR) - (setq TM_LISPDIR (expand-file-name TM_PACKAGE_PREFIX LISPDIR)) (setq TL_DIR (expand-file-name TL_PREFIX TM_LISPDIR)) @@ -149,7 +170,7 @@ (setq BIN_SRC_DIR "src") -(setq BINS '("src/ol2" "src/decode-b")) +(setq BINS '("ol2" "decode-b")) (setq METHOD_SRC_DIR "methods") (setq METHODS '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg" "tm-plain"