]> git.eshelyaron.com Git - emacs.git/commitdiff
Reduce the number of versioned files storing the short copyright string
authorGlenn Morris <rgm@gnu.org>
Mon, 17 Sep 2012 00:56:08 +0000 (17:56 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 17 Sep 2012 00:56:08 +0000 (17:56 -0700)
* 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.

15 files changed:
ChangeLog
admin/ChangeLog
admin/admin.el
configure.ac
lib-src/ChangeLog
lib-src/ebrowse.c
lib-src/etags.c
nextstep/ChangeLog
nextstep/templates/Info-gnustep.plist.in
nextstep/templates/Info.plist.in
nextstep/templates/InfoPlist.strings.in
nt/ChangeLog
nt/config.nt
src/ChangeLog
src/emacs.c

index 4bdca0c914acba44e8ea0220567572be81ef476b..5edcd767b27d7b3d9b92860d58838f86e9330345 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-17  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (copyright): New output variable.
+       (COPYRIGHT): New AC_DEFINE.
+
 2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Remove configure's --without-sync-input option (Bug#12450).
index 8fe16b9e766ae6154c5e963cea384f2333c3ae0f..6d3118d8ba6a6e7f93f35f9a8cc23b6c3fc4a9ec 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-17  Glenn Morris  <rgm@gnu.org>
+
+       * admin.el (set-copyright): No more need to set copyrights for
+       nextstep, or .c files.  Add configure.ac and config.nt.
+
 2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Remove configure's --without-sync-input option (Bug#12450).
index b076bb67dd1193d0e464890d65c1c3b1ecc90ea1..4d68fca97b2384381da12240c701647c0de03b9a 100644 (file)
@@ -140,34 +140,18 @@ Root must be the root of an Emacs source tree."
                          (format-time-string "%Y")))))
   (unless (file-exists-p (expand-file-name "src/emacs.c" root))
     (error "%s doesn't seem to be the root of an Emacs source tree" root))
-  (set-version-in-file root "src/emacs.c" copyright
-                      (rx (and "emacs_copyright" (0+ (not (in ?\")))
-                               ?\" (submatch (1+ (not (in ?\")))) ?\")))
-  (set-version-in-file root "lib-src/ebrowse.c" copyright
-                       (rx (and "emacs_copyright" (0+ (not (in ?\")))
-                               ?\" (submatch (1+ (not (in ?\")))) ?\")))
-  (set-version-in-file root "lib-src/etags.c" copyright
-                       (rx (and "emacs_copyright" (0+ (not (in ?\")))
+  (set-version-in-file root "configure.ac" copyright
+                      (rx (and bol "copyright" (0+ (not (in ?\")))
                                ?\" (submatch (1+ (not (in ?\")))) ?\")))
+  (set-version-in-file root "nt/config.nt" copyright
+                      (rx (and bol "#" (0+ blank) "define" (1+ blank)
+                               "COPYRIGHT" (1+ blank)
+                               ?\" (submatch (1+ (not (in ?\")))) ?\")))
   (set-version-in-file root "lib-src/rcs2log" copyright
                       (rx (and "Copyright" (0+ space) ?= (0+ space)
                                ?\' (submatch (1+ nonl)))))
   ;; This one is a nuisance, as it needs to be split over two lines.
   (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
-  ;; nextstep.
-  (set-version-in-file
-   root "nextstep/templates/Info.plist.in"
-   copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space)
-                    (1+ (in "0-9.")) (1+ space)
-                    (submatch (1+ (not (in ?\<)))))))
-  (set-version-in-file
-   root "nextstep/templates/InfoPlist.strings.in"
-   copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space)
-                    ?\" (submatch (1+ (not (in ?\")))))))
-  (set-version-in-file
-   root "nextstep/templates/Info-gnustep.plist.in"
-   copyright (rx (and "Copyright" (0+ space) ?\= (0+ space)
-                      ?\" (submatch (1+ (not (in ?\")))))))
   (when (string-match "\\([0-9]\\{4\\}\\)" copyright)
     (setq copyright (match-string 1 copyright))
     (dolist (file (directory-files (expand-file-name "etc/refcards" root)
index 569b367371a7247f5d785bbc445e8e34cbdd9e44..d09d22bcbbd4d17e3aea35866efc99709e8d8906 100644 (file)
@@ -3978,6 +3978,11 @@ fi
 
 version=$PACKAGE_VERSION
 
+copyright="Copyright (C) 2012 Free Software Foundation, Inc."
+AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"],
+  [Short copyright string for this version of Emacs.])
+AC_SUBST(copyright)
+
 ### Specify what sort of things we'll be editing into Makefile and config.h.
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
 AC_SUBST(version)
index f584665770755380bcc52eeeab884ebe6070320a..3f1e287db34cdcdbaa27f95de54b9b3088a251d8 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-17  Glenn Morris  <rgm@gnu.org>
+
+       * ebrowse.c (version):
+       * etags.c (print_version): Use COPYRIGHT.
+
 2012-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        * pop.c (socket_connection) [HAVE_GETADDRINFO]:
index f8569fe3747a882af840ce4027a1ca8ded0fd7d6..056ed471fdeaf31b0f9dba47ba4083819afc10bf 100644 (file)
@@ -3516,8 +3516,7 @@ usage (int error)
 static _Noreturn void
 version (void)
 {
-  /* Makes it easier to update automatically. */
-  char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc.";
+  char emacs_copyright[] = COPYRIGHT;
 
   printf ("ebrowse %s\n", VERSION);
   puts (emacs_copyright);
index e65082de5343a16b0c92372c590a533ead2f080e..ec415e9905f889d55103f5e8efa35ff77e8978fa 100644 (file)
@@ -836,8 +836,7 @@ etags --help --lang=ada.");
 static void
 print_version (void)
 {
-  /* Makes it easier to update automatically. */
-  char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc.";
+  char emacs_copyright[] = COPYRIGHT;
 
   printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION);
   puts (emacs_copyright);
index be73bc1f168294dd97f6bbd6be21fece5b5e2ff7..53f42c97716924be5e751dd528587f7a54a29058 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-17  Glenn Morris  <rgm@gnu.org>
+
+       * templates/Info-gnustep.plist.in, templates/InfoPlist.strings.in:
+       * templates/Info.plist.in: Let configure set copyright.
+
 2012-09-16  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in: New file.
index 6da5af489fbab7771c3069b5d2ad06e1d358338a..4ac97e5cde695bd463a85912ef0d2751d7933d83 100644 (file)
@@ -11,7 +11,7 @@
        "Carl Edman (NeXTstep)",
        "..see etc/NEXTSTEP"
     );
-    Copyright = "Copyright (C) 2012 Free Software Foundation, Inc.";
+    Copyright = "@copyright@";
     CopyrightDescription = "Released under the GNU General Public License Version 3 or later";
     FullVersionID = "Emacs @version@, NS Windowing";
     NSExecutable = Emacs;
index df9708eae71e488a0ddf3833ac619a0107b7e2ae..25c73916e5831a1c84a2f5f896e74d535215aa59 100644 (file)
@@ -553,7 +553,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
        <key>CFBundleExecutable</key>
        <string>Emacs</string>
        <key>CFBundleGetInfoString</key>
-       <string>Emacs @version@ Copyright (C) 2012 Free Software Foundation, Inc.</string>
+       <string>Emacs @version@ @copyright@</string>
        <key>CFBundleIconFile</key>
        <string>Emacs.icns</string>
        <key>CFBundleIdentifier</key>
index ce9779c7ac88ce7f7e02ea89048bdf46f83e155c..f38d89250174103002c25feb4b07f8cceec480b6 100644 (file)
@@ -3,4 +3,4 @@
 CFBundleName = "Emacs";
 CFBundleShortVersionString = "Version @version@";
 CFBundleGetInfoString = "Emacs version @version@, NS Windowing";
-NSHumanReadableCopyright = "Copyright (C) 2012 Free Software Foundation, Inc.";
+NSHumanReadableCopyright = "@copyright@";
index 197ce0cf850bd49f00fce0a81604fce4db9e4071..f2a5281d1f8dd18e35cb059917fa2b169f37cdad 100644 (file)
@@ -1,3 +1,7 @@
+2012-09-17  Glenn Morris  <rgm@gnu.org>
+
+       * config.nt (COPYRIGHT): New.
+
 2012-09-15  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port _setjmp fix to POSIXish hosts as well as Microsoft.
index 82b7da430abc6f7296fe8792fc23f9aa52b5d325..96217a8c580644b64d9af48867729b0f69f20d04 100644 (file)
@@ -86,6 +86,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    his/her Emacs. */
 #undef CLASH_DETECTION
 
+/* Short copyright string for this version of Emacs. */
+#define COPYRIGHT "Copyright (C) 2012 Free Software Foundation, Inc."
+
 /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP
    systems. This function is required for 'alloca.c' support on those systems.
    */
index f21395d963297371321943591f7972d954734f5b..3c0799d14b3686c296c4d175570bfada884d9a96 100644 (file)
@@ -1,3 +1,7 @@
+2012-09-17  Glenn Morris  <rgm@gnu.org>
+
+       * emacs.c: Use COPYRIGHT.
+
 2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Remove configure's --without-sync-input option (Bug#12450).
index 233c0e68a14d3f4651cbf919549c7bc835b037cb..d4b52ab64ea80eccaa32342b0273b6ae07173cac 100644 (file)
@@ -88,7 +88,7 @@ extern void moncontrol (int mode);
 #endif
 
 static const char emacs_version[] = VERSION;
-static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc.";
+static const char emacs_copyright[] = COPYRIGHT;
 
 /* Empty lisp strings.  To avoid having to build any others.  */
 Lisp_Object empty_unibyte_string, empty_multibyte_string;