This commit was generated by cvs2svn to compensate for changes in r272,
[elisp/tm.git] / gnus / mk-tgnus
1 ;;; -*-Emacs-Lisp-*-
2 ;;;
3 ;;; $Id: mk-tgnus,v 1.1 1995/11/18 08:07:24 morioka Exp morioka $
4 ;;;
5
6 (setq load-path
7       (append
8        (mapcar (function
9                 (lambda (path)
10                   (expand-file-name path (getenv "PWD"))
11                   ))
12                '("." ".." "../../tl/" "../../mel/"))
13        load-path))
14
15 (require 'emu)
16
17 (defun compile-tm-gnus ()
18   (load "gnus.el")
19   (require 'tm-view)
20   (require 'tm-partial)
21   (require 'tm-edit)
22   (princ (format "%s\n" gnus-version))
23   (cond ((boundp 'gnus-original-article-buffer)
24          (require 'tm-gnus)
25          (byte-compile-file "tm-sgnus.el")
26          (byte-compile-file "tm-gd5.el")
27          )
28         ((string-match "Gnus v5\\|September Gnus" gnus-version)
29          (require 'tm-gnus)
30          (byte-compile-file "tm-gnus4.el")
31          (byte-compile-file "tm-gd5.el")
32          )
33         ((string-match "GNUS 4" gnus-version)
34          (require 'tm-gnus)
35          (byte-compile-file "tm-gnus4.el")
36          )
37         ((string-match "GNUS 3" gnus-version)
38          (require 'tm-gnus)
39          (byte-compile-file "tm-gnus3.el")
40          ))
41   ;;(byte-compile-file "tm-gnus.el")
42   )
43
44 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
45
46 (defun install-el (path file)
47   (let ((full-path (expand-file-name file path)))
48     (if (file-exists-p full-path)
49         (set-file-modes full-path el-file-mode)
50       )
51     (copy-file file full-path t t)
52     (princ (format "%s -> %s\n" file path))
53     ))
54
55 (defun install-el-files (path &rest files)
56   (mapcar (function (lambda (file)
57                       (if (file-exists-p file)
58                           (install-el path file)
59                         )))
60           files))
61
62 (defun install-elc (path file)
63   (let ((full-path (expand-file-name file path)))
64     (copy-file file full-path t t)
65     (delete-file file)
66     (princ (format "%s -> %s\n" file path))
67     ))
68
69 (defun install-elc-files (path &rest files)
70   (mapcar (function (lambda (file)
71                       (if (file-exists-p file)
72                           (install-elc path file)
73                         )))
74           files))
75
76 (defun install-tm-gnus ()
77   (let ((path (car command-line-args-left)))
78     (princ (format "%s\n" emacs-version))
79     (if (not (file-exists-p path))
80         (make-directory path t)
81       )
82     (cond ((< (string-to-int emacs-version) 19)
83            (install-el-files path
84                              "tm-gnus.el"
85                              "tm-gnus3.el" "tm-gnus4.el"
86                              "tm-gd3.el")
87            (install-elc-files path
88                               ;;"tm-gnus.elc"
89                               "tm-gnus3.elc" "tm-gnus4.elc")
90            )
91           ((<= emacs-minor-version 29)
92            (install-el-files path
93                              "tm-gnus.el"
94                              "tm-sgnus.el" "tm-gnus4.el"
95                              "tm-gd5.el" "tm-gd3.el")
96            (install-elc-files path
97                               ;;"tm-gnus.elc"
98                               "tm-sgnus.elc" "tm-gnus4.elc"
99                               "tm-gd5.elc")
100            )
101           (t
102            (install-el-files path
103                              "tm-gnus.el"
104                              "tm-sgnus.el" "tm-gnus4.el"
105                              "tm-gd5.el")
106            (install-elc-files path
107                               ;;"tm-gnus.elc"
108                               "tm-sgnus.elc" "tm-gnus4.elc"
109                               "tm-gd5.elc")
110            ))))