annotate admin/admin.el @ 77836:7abeffb8f06b

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Tue, 29 May 2007 19:43:27 +0000
parents 3d45362f1d38
children 450fa81c5930 fd5ff936aab8 95d0cdf160ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 ;;; admin.el --- utilities for Emacs administration
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
75348
3d45362f1d38 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74439
diff changeset
3 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
3d45362f1d38 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74439
diff changeset
4 ;; Free Software Foundation, Inc.
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 ;; This file is part of GNU Emacs.
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8 ;; GNU Emacs is free software; you can redistribute it and/or modify
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9 ;; it under the terms of the GNU General Public License as published by
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 ;; the Free Software Foundation; either version 2, or (at your option)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 ;; any later version.
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 ;; GNU Emacs is distributed in the hope that it will be useful,
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 ;; GNU General Public License for more details.
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 ;; You should have received a copy of the GNU General Public License
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64079
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 63217
diff changeset
20 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 63217
diff changeset
21 ;; Boston, MA 02110-1301, USA.
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23 ;;; Commentary:
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
24
61547
1926d92f781e (add-release-logs): Fix require call.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
25 ;; add-release-logs Add ``Version X released'' change log entries.
1926d92f781e (add-release-logs): Fix require call.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
26 ;; set-version Change Emacs version number in source tree.
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 ;;; Code:
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 (defun process-lines (program &rest args)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 "Execute PROGRAM with ARGS, returning its output as a list of lines.
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 Signal an error if the program returns with a non-zero exit status."
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 (with-temp-buffer
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 (let ((status (apply 'call-process program nil (current-buffer) nil args)))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 (unless (eq status 0)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 (error "%s exited with status %s" program status))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 (goto-char (point-min))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 (let (lines)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39 (while (not (eobp))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 (setq lines (cons (buffer-substring-no-properties
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 (line-beginning-position)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 (line-end-position))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 lines))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 (forward-line 1))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 (nreverse lines)))))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
47 (defun add-release-logs (root version)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 "Add \"Version VERSION released.\" change log entries in ROOT.
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49 Root must be the root of an Emacs source tree."
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
50 (interactive "DEmacs root directory: \nNVersion number: ")
49298
bb7bf9ff7c97 (add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents: 40161
diff changeset
51 (setq root (expand-file-name root))
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
52 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
53 (error "%s doesn't seem to be the root of an Emacs source tree" root))
61547
1926d92f781e (add-release-logs): Fix require call.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
54 (require 'add-log)
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
55 (let* ((logs (process-lines "find" root "-name" "ChangeLog"))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
56 (entry (format "%s %s <%s>\n\n\t* Version %s released.\n\n"
49298
bb7bf9ff7c97 (add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents: 40161
diff changeset
57 (funcall add-log-time-format)
bb7bf9ff7c97 (add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents: 40161
diff changeset
58 (or add-log-full-name (user-full-name))
bb7bf9ff7c97 (add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents: 40161
diff changeset
59 (or add-log-mailing-address user-mail-address)
bb7bf9ff7c97 (add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents: 40161
diff changeset
60 version)))
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 (dolist (log logs)
40084
1f20d08b9da5 (add-release-logs): Put the log entry in lispref, too.
Gerd Moellmann <gerd@gnu.org>
parents: 40063
diff changeset
62 (unless (string-match "/gnus/" log)
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
63 (find-file log)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64 (goto-char (point-min))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65 (insert entry)))))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
66
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 (defun set-version-in-file (root file version rx)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
68 (find-file (expand-file-name file root))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
69 (goto-char (point-min))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70 (unless (re-search-forward rx nil t)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71 (error "Version not found in %s" file))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 (replace-match (format "%s" version) nil nil nil 1))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 (defun set-version (root version)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 "Set Emacs version to VERSION in relevant files under ROOT.
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 Root must be the root of an Emacs source tree."
40161
795c8ca09f8b (set-version): Use `s' interactive spec for
Gerd Moellmann <gerd@gnu.org>
parents: 40084
diff changeset
77 (interactive "DEmacs root directory: \nsVersion number: ")
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 (error "%s doesn't seem to be the root of an Emacs source tree" root))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 (set-version-in-file root "lisp/version.el" version
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81 (rx (and "emacs-version" (0+ space)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82 ?\" (submatch (1+ (not (in ?\")))) ?\")))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
83 (set-version-in-file root "README" version
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
84 (rx (and "version" (1+ space)
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 (submatch (1+ (in "0-9."))))))
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86 (set-version-in-file root "man/emacs.texi" version
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
87 (rx (and "EMACSVER" (1+ space)
63217
3ef574f6b152 (set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents: 61547
diff changeset
88 (submatch (1+ (in "0-9."))))))
3ef574f6b152 (set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents: 61547
diff changeset
89 (set-version-in-file root "lispref/elisp.texi" version
3ef574f6b152 (set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents: 61547
diff changeset
90 (rx (and "EMACSVER" (1+ space)
65774
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
91 (submatch (1+ (in "0-9."))))))
74187
b7548a5c934e (set-version): Set version number in lib-src/makefile.w32-in.
Juanma Barranquero <lekktu@gmail.com>
parents: 73372
diff changeset
92 (set-version-in-file root "lib-src/makefile.w32-in" version
b7548a5c934e (set-version): Set version number in lib-src/makefile.w32-in.
Juanma Barranquero <lekktu@gmail.com>
parents: 73372
diff changeset
93 (rx (and "VERSION" (0+ space) "=" (0+ space)
b7548a5c934e (set-version): Set version number in lib-src/makefile.w32-in.
Juanma Barranquero <lekktu@gmail.com>
parents: 73372
diff changeset
94 (submatch (1+ (in "0-9."))))))
65774
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
95 ;; nt/emacs.rc also contains the version number, but in an awkward
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
96 ;; format. It must contain four components, separated by commas, and
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
97 ;; in two places those commas are followed by space, in two other
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
98 ;; places they are not.
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
99 (let* ((version-components (append (split-string version "\\.")
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
100 '("0" "0")))
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
101 (comma-version
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
102 (concat (car version-components) ","
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
103 (cadr version-components) ","
73372
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
104 (cadr (cdr version-components)) ","
65774
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
105 (cadr (cdr (cdr version-components)))))
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
106 (comma-space-version
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
107 (concat (car version-components) ", "
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
108 (cadr version-components) ", "
73372
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
109 (cadr (cdr version-components)) ", "
65774
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
110 (cadr (cdr (cdr version-components))))))
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
111 (set-version-in-file root "nt/emacs.rc" comma-version
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
112 (rx (and "FILEVERSION" (1+ space)
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
113 (submatch (1+ (in "0-9,"))))))
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
114 (set-version-in-file root "nt/emacs.rc" comma-version
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
115 (rx (and "PRODUCTVERSION" (1+ space)
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
116 (submatch (1+ (in "0-9,"))))))
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
117 (set-version-in-file root "nt/emacs.rc" comma-space-version
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
118 (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
119 ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
120 (set-version-in-file root "nt/emacs.rc" comma-space-version
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
121 (rx (and "\"ProductVersion\"" (0+ space) ?,
ffd4e3fb1637 (set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents: 64079
diff changeset
122 (0+ space) ?\" (submatch (1+ (in "0-9, ")))
73372
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
123 "\\0\"")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
124 ;; Some files in the "mac" subdirectory also contain the version
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
125 ;; number.
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
126 (set-version-in-file
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
127 root "mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings"
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
128 version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) ?\"
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
129 (submatch (1+ (in "0-9."))))))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
130 (set-version-in-file
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
131 root "mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings"
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
132 version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) ?\"
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
133 (submatch (1+ (in "0-9."))))))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
134 (set-version-in-file root "mac/src/Emacs.r" (car version-components)
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
135 (rx (and "GNU Emacs " (submatch (1+ (in "0-9")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
136 " for Mac OS")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
137 (set-version-in-file root "mac/src/Emacs.r" (car version-components)
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
138 (rx (and (submatch (1+ (in "0-9"))) (0+ space) ?\,
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
139 (0+ space) "/* Major revision in BCD */")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
140 (set-version-in-file root "mac/src/Emacs.r" (cadr version-components)
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
141 (rx (and (submatch (1+ (in "0-9"))) (0+ space) ?\,
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
142 (0+ space) "/* Minor revision in BCD */")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
143 (set-version-in-file root "mac/src/Emacs.r" (cadr (cdr version-components))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
144 (rx (and (submatch (1+ (in "0-9"))) (0+ space) ?\,
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
145 (0+ space) "/* Non-final release # */")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
146 (set-version-in-file root "mac/src/Emacs.r" version
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
147 (rx (and (submatch (1+ (in "0-9."))) (0+ space) ?\" ?\,
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
148 (0+ space) "/* Short version number */")))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
149 (set-version-in-file root "mac/src/Emacs.r" version
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
150 (rx (and "/* Short version number */" (0+ space) ?\"
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
151 (submatch (1+ (in "0-9."))))))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
152 (let* ((third-component (string-to-number (cadr (cdr version-components))))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
153 (release (cond ((>= third-component 90) "alpha")
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
154 ((>= third-component 50) "development")
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
155 (t "final"))))
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
156 (set-version-in-file
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
157 root "mac/src/Emacs.r" release
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
158 (rx (and (submatch (1+ (in "a-z"))) (0+ space) ?\, (0+ space)
726551ae0c3e (set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65774
diff changeset
159 "/* development, alpha, beta, or final (release) */"))))))
49298
bb7bf9ff7c97 (add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents: 40161
diff changeset
160
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49298
diff changeset
161 ;;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5
40063
9b5a774d579b *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
162 ;; admin.el ends here.