aboutsummaryrefslogtreecommitdiffstats
path: root/admin/admin.el
diff options
context:
space:
mode:
authorGlenn Morris2012-09-16 17:56:08 -0700
committerGlenn Morris2012-09-16 17:56:08 -0700
commit78f83752f50a2aa9944e60a5aceac4015eb3ca58 (patch)
tree48c1ff5a6e08a5d69ef36593de966018f229b01e /admin/admin.el
parent48093eb9bca47488b6867e53a12e7cac37d6f5a6 (diff)
downloademacs-78f83752f50a2aa9944e60a5aceac4015eb3ca58.tar.gz
emacs-78f83752f50a2aa9944e60a5aceac4015eb3ca58.zip
Reduce the number of versioned files storing the short copyright string
* configure.ac (copyright): New output variable. (COPYRIGHT): New AC_DEFINE. * admin/admin.el (set-copyright): No more need to set copyrights for nextstep, or .c files. Add configure.ac and config.nt. * lib-src/ebrowse.c (version): * lib-src/etags.c (print_version): Use COPYRIGHT. * nextstep/templates/Info-gnustep.plist.in: * nextstep/templates/InfoPlist.strings.in: * nextstep/templates/Info.plist.in: Let configure set copyright. * nt/config.nt (COPYRIGHT): New. * src/emacs.c: Use COPYRIGHT.
Diffstat (limited to 'admin/admin.el')
-rw-r--r--admin/admin.el28
1 files changed, 6 insertions, 22 deletions
diff --git a/admin/admin.el b/admin/admin.el
index b076bb67dd1..4d68fca97b2 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -140,34 +140,18 @@ Root must be the root of an Emacs source tree."
140 (format-time-string "%Y"))))) 140 (format-time-string "%Y")))))
141 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) 141 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
142 (error "%s doesn't seem to be the root of an Emacs source tree" root)) 142 (error "%s doesn't seem to be the root of an Emacs source tree" root))
143 (set-version-in-file root "src/emacs.c" copyright 143 (set-version-in-file root "configure.ac" copyright
144 (rx (and "emacs_copyright" (0+ (not (in ?\"))) 144 (rx (and bol "copyright" (0+ (not (in ?\")))
145 ?\" (submatch (1+ (not (in ?\")))) ?\")))
146 (set-version-in-file root "lib-src/ebrowse.c" copyright
147 (rx (and "emacs_copyright" (0+ (not (in ?\")))
148 ?\" (submatch (1+ (not (in ?\")))) ?\")))
149 (set-version-in-file root "lib-src/etags.c" copyright
150 (rx (and "emacs_copyright" (0+ (not (in ?\")))
151 ?\" (submatch (1+ (not (in ?\")))) ?\"))) 145 ?\" (submatch (1+ (not (in ?\")))) ?\")))
146 (set-version-in-file root "nt/config.nt" copyright
147 (rx (and bol "#" (0+ blank) "define" (1+ blank)
148 "COPYRIGHT" (1+ blank)
149 ?\" (submatch (1+ (not (in ?\")))) ?\")))
152 (set-version-in-file root "lib-src/rcs2log" copyright 150 (set-version-in-file root "lib-src/rcs2log" copyright
153 (rx (and "Copyright" (0+ space) ?= (0+ space) 151 (rx (and "Copyright" (0+ space) ?= (0+ space)
154 ?\' (submatch (1+ nonl))))) 152 ?\' (submatch (1+ nonl)))))
155 ;; This one is a nuisance, as it needs to be split over two lines. 153 ;; This one is a nuisance, as it needs to be split over two lines.
156 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) 154 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
157 ;; nextstep.
158 (set-version-in-file
159 root "nextstep/templates/Info.plist.in"
160 copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space)
161 (1+ (in "0-9.")) (1+ space)
162 (submatch (1+ (not (in ?\<)))))))
163 (set-version-in-file
164 root "nextstep/templates/InfoPlist.strings.in"
165 copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space)
166 ?\" (submatch (1+ (not (in ?\")))))))
167 (set-version-in-file
168 root "nextstep/templates/Info-gnustep.plist.in"
169 copyright (rx (and "Copyright" (0+ space) ?\= (0+ space)
170 ?\" (submatch (1+ (not (in ?\")))))))
171 (when (string-match "\\([0-9]\\{4\\}\\)" copyright) 155 (when (string-match "\\([0-9]\\{4\\}\\)" copyright)
172 (setq copyright (match-string 1 copyright)) 156 (setq copyright (match-string 1 copyright))
173 (dolist (file (directory-files (expand-file-name "etc/refcards" root) 157 (dolist (file (directory-files (expand-file-name "etc/refcards" root)