aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-11-22 14:04:32 -0800
committerGlenn Morris2014-11-22 14:07:48 -0800
commit84e2f13cd50a7ef6af736559107f0a8e6bcec6c5 (patch)
treec8b5f5424908cc820cc8e51c1669e889b15f3d7c
parent239cd5b62759b23020cb308d993b7e26933943d7 (diff)
downloademacs-84e2f13cd50a7ef6af736559107f0a8e6bcec6c5.tar.gz
emacs-84e2f13cd50a7ef6af736559107f0a8e6bcec6c5.zip
Further reduce number of versioned files storing Emacs version number.
* configure.ac (comma_version, comma_space_version) [mingw32]: New output variables. (nt/emacs.rc, nt/emacsclient.rc) [mingw32]: New output files. * make-dist: Update nt/ for *.rc -> *.rc.in changes. * nt/emacs.rc.in, nt/emacsclient.rc.in: Rename from nt/emacs.rc, emacsclient.rc. Let configure generate the real files, and set the version numbers. * lib-src/Makefile.in (emacsclient.res): Update deps for nt/emacsclient.rc now being in the build directory, not the source directory. * nt/Makefile.in (distclean): Delete *.rc. (emacs.res): Update deps for nt/emacsclient.rc now being in the build directory, not the source directory. * admin/admin.el (set-version): No more need to update nt/*.rc. * admin/authors.el (authors-renamed-files-alist): Add .rc.in files.
-rw-r--r--ChangeLog8
-rw-r--r--admin/ChangeLog5
-rw-r--r--admin/admin.el45
-rw-r--r--admin/authors.el2
-rw-r--r--configure.ac9
-rw-r--r--lib-src/ChangeLog3
-rw-r--r--lib-src/Makefile.in2
-rwxr-xr-xmake-dist6
-rw-r--r--nt/ChangeLog6
-rw-r--r--nt/Makefile.in6
-rw-r--r--nt/emacs.rc.in45
-rw-r--r--nt/emacsclient.rc.in39
-rw-r--r--src/Makefile.in2
13 files changed, 127 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index 749c020b698..f40624c42e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12014-11-22 Glenn Morris <rgm@gnu.org>
2
3 Further reduce number of versioned files storing Emacs version number.
4 * configure.ac (comma_version, comma_space_version) [mingw32]:
5 New output variables.
6 (nt/emacs.rc, nt/emacsclient.rc) [mingw32]: New output files.
7 * make-dist: Update nt/ for *.rc -> *.rc.in changes.
8
12014-11-19 Dani Moncayo <dmoncayo@gmail.com> 92014-11-19 Dani Moncayo <dmoncayo@gmail.com>
2 10
3 * build-aux/msys-to-w32: Simplify implementation and docstring; 11 * build-aux/msys-to-w32: Simplify implementation and docstring;
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 96a98e56109..cc69367555f 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,8 @@
12014-11-22 Glenn Morris <rgm@gnu.org>
2
3 * admin.el (set-version): No more need to update nt/*.rc.
4 * authors.el (authors-renamed-files-alist): Add .rc.in files.
5
12014-11-16 Glenn Morris <rgm@gnu.org> 62014-11-16 Glenn Morris <rgm@gnu.org>
2 7
3 * update_autogen: Auto-detect VCS in use. 8 * update_autogen: Auto-detect VCS in use.
diff --git a/admin/admin.el b/admin/admin.el
index b22160ef478..d6c702a3bdf 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -99,6 +99,8 @@ Root must be the root of an Emacs source tree."
99 (rx (and bol "#" (0+ blank) "define" (1+ blank) 99 (rx (and bol "#" (0+ blank) "define" (1+ blank)
100 "VERSION" (1+ blank) "\"" 100 "VERSION" (1+ blank) "\""
101 (submatch (1+ (in "0-9.")))))) 101 (submatch (1+ (in "0-9."))))))
102 ;; TODO: msdos could easily extract the version number from
103 ;; configure.ac with sed, rather than duplicating the information.
102 (set-version-in-file root "msdos/sed2v2.inp" version 104 (set-version-in-file root "msdos/sed2v2.inp" version
103 (rx (and bol "/^#undef " (1+ not-newline) 105 (rx (and bol "/^#undef " (1+ not-newline)
104 "define VERSION" (1+ space) "\"" 106 "define VERSION" (1+ space) "\""
@@ -107,49 +109,6 @@ Root must be the root of an Emacs source tree."
107 (set-version-in-file root "nt/makefile.w32-in" version 109 (set-version-in-file root "nt/makefile.w32-in" version
108 (rx (and "VERSION" (0+ space) "=" (0+ space) 110 (rx (and "VERSION" (0+ space) "=" (0+ space)
109 (submatch (1+ (in "0-9.")))))) 111 (submatch (1+ (in "0-9."))))))
110 ;; nt/emacs.rc also contains the version number, but in an awkward
111 ;; format. It must contain four components, separated by commas, and
112 ;; in two places those commas are followed by space, in two other
113 ;; places they are not.
114 (let* ((version-components (append (split-string version "\\.")
115 '("0" "0")))
116 (comma-version
117 (concat (car version-components) ","
118 (cadr version-components) ","
119 (cadr (cdr version-components)) ","
120 (cadr (cdr (cdr version-components)))))
121 (comma-space-version
122 (concat (car version-components) ", "
123 (cadr version-components) ", "
124 (cadr (cdr version-components)) ", "
125 (cadr (cdr (cdr version-components))))))
126 (set-version-in-file root "nt/emacs.rc" comma-version
127 (rx (and "FILEVERSION" (1+ space)
128 (submatch (1+ (in "0-9,"))))))
129 (set-version-in-file root "nt/emacs.rc" comma-version
130 (rx (and "PRODUCTVERSION" (1+ space)
131 (submatch (1+ (in "0-9,"))))))
132 (set-version-in-file root "nt/emacs.rc" comma-space-version
133 (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
134 ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
135 (set-version-in-file root "nt/emacs.rc" comma-space-version
136 (rx (and "\"ProductVersion\"" (0+ space) ?,
137 (0+ space) ?\" (submatch (1+ (in "0-9, ")))
138 "\\0\"")))
139 ;; Likewise for emacsclient.rc
140 (set-version-in-file root "nt/emacsclient.rc" comma-version
141 (rx (and "FILEVERSION" (1+ space)
142 (submatch (1+ (in "0-9,"))))))
143 (set-version-in-file root "nt/emacsclient.rc" comma-version
144 (rx (and "PRODUCTVERSION" (1+ space)
145 (submatch (1+ (in "0-9,"))))))
146 (set-version-in-file root "nt/emacsclient.rc" comma-space-version
147 (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
148 ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
149 (set-version-in-file root "nt/emacsclient.rc" comma-space-version
150 (rx (and "\"ProductVersion\"" (0+ space) ?,
151 (0+ space) ?\" (submatch (1+ (in "0-9, ")))
152 "\\0\"")))
153 ;; Major version only. 112 ;; Major version only.
154 (when (string-match "\\([0-9]\\{2,\\}\\)" version) 113 (when (string-match "\\([0-9]\\{2,\\}\\)" version)
155 (setq version (match-string 1 version)) 114 (setq version (match-string 1 version))
diff --git a/admin/authors.el b/admin/authors.el
index aefd947e802..b05f37ba8dd 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -730,6 +730,8 @@ in the repository.")
730 ("paths.h-dist" . "epaths.in") 730 ("paths.h-dist" . "epaths.in")
731 ("paths.h.in" . "epaths.in") 731 ("paths.h.in" . "epaths.in")
732 ("paths.in" . "epaths.in") 732 ("paths.in" . "epaths.in")
733 ("emacs.rc" . "emacs.rc.in")
734 ("emacsclient.rc" . "emacsclient.rc.in")
733 ("patch1" . "sed1.inp") 735 ("patch1" . "sed1.inp")
734 ("INSTALL.MSYS" . "INSTALL") 736 ("INSTALL.MSYS" . "INSTALL")
735 ("server.c" . "emacsserver.c") 737 ("server.c" . "emacsserver.c")
diff --git a/configure.ac b/configure.ac
index 5d71c2f6a6e..85d11234035 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4679,6 +4679,15 @@ AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure
4679case $opsys in 4679case $opsys in
4680 mingw32) 4680 mingw32)
4681 AC_DEFINE(config_opsysfile, <ms-w32.h>, []) 4681 AC_DEFINE(config_opsysfile, <ms-w32.h>, [])
4682
4683 dnl Construct something of the form "24,4,0,0" with 4 components.
4684 comma_version=`echo "$version.0.0" | sed -e 's/\./,/g' -e 's/^\([[^,]]*,[[^,]]*,[[^,]]*,[[^,]]*\).*/\1/'`
4685
4686 comma_space_version=`echo "$comma_version" | sed 's/,/, /g'`
4687
4688 AC_SUBST(comma_version)
4689 AC_SUBST(comma_space_version)
4690 AC_CONFIG_FILES([nt/emacs.rc nt/emacsclient.rc])
4682 ;; 4691 ;;
4683esac 4692esac
4684 4693
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index a8281a579f1..4fc3b4dbe57 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,8 @@
12014-11-22 Glenn Morris <rgm@gnu.org> 12014-11-22 Glenn Morris <rgm@gnu.org>
2 2
3 * Makefile.in (emacsclient.res): Update deps for nt/emacsclient.rc
4 now being in the build directory, not the source directory.
5
3 * Makefile.in (emacsclient.res): Add dependency on icons/emacs.ico. 6 * Makefile.in (emacsclient.res): Add dependency on icons/emacs.ico.
4 7
52014-10-20 Glenn Morris <rgm@gnu.org> 82014-10-20 Glenn Morris <rgm@gnu.org>
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index eb16c3305ae..432314f02dd 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -388,7 +388,7 @@ update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
388 -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ 388 -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
389 $< $(LOADLIBES) $(NTLIB) -o $@ 389 $< $(LOADLIBES) $(NTLIB) -o $@
390 390
391emacsclient.res: $(NTINC)/../emacsclient.rc ${srcdir}/icons/emacs.ico 391emacsclient.res: ../nt/emacsclient.rc ${srcdir}/icons/emacs.ico
392 $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $< 392 $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $<
393 393
394## Makefile ends here. 394## Makefile ends here.
diff --git a/make-dist b/make-dist
index 45df561ce13..6e85f1dc216 100755
--- a/make-dist
+++ b/make-dist
@@ -392,10 +392,10 @@ echo "Making links to \`m4'"
392 392
393echo "Making links to \`nt'" 393echo "Making links to \`nt'"
394(cd nt 394(cd nt
395 ln emacs-x86.manifest emacs-x64.manifest emacs.rc ../${tempdir}/nt 395 ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt
396 ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt 396 ln config.nt emacs-src.tags ../${tempdir}/nt
397 ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt 397 ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
398 ln Makefile.in gnulib.mk ../${tempdir}/nt 398 ln *.in gnulib.mk ../${tempdir}/nt
399 ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt 399 ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
400 ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) 400 ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt)
401 401
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 49ef65afe6e..168f1dd9ed3 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,5 +1,11 @@
12014-11-22 Glenn Morris <rgm@gnu.org> 12014-11-22 Glenn Morris <rgm@gnu.org>
2 2
3 * emacs.rc.in, emacsclient.rc.in: Rename from emacs.rc, emacsclient.rc.
4 Let configure generate the real files, and set the version numbers.
5 * Makefile.in (distclean): Delete *.rc.
6 (emacs.res): Update deps for nt/emacsclient.rc now being in the
7 build directory, not the source directory.
8
3 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. 9 * Makefile.in (emacs.res): Add dependency on icons/hand.cur.
4 10
52014-11-18 Glenn Morris <rgm@gnu.org> 112014-11-18 Glenn Morris <rgm@gnu.org>
diff --git a/nt/Makefile.in b/nt/Makefile.in
index c456d55e4f8..c6b2f0bea0e 100644
--- a/nt/Makefile.in
+++ b/nt/Makefile.in
@@ -195,8 +195,7 @@ clean: mostlyclean
195 -rm -f ${EXE_FILES} 195 -rm -f ${EXE_FILES}
196 196
197distclean: clean 197distclean: clean
198 -rm -f TAGS 198 -rm -f TAGS Makefile *.rc
199 -rm -f Makefile
200 199
201bootstrap-clean maintainer-clean: distclean 200bootstrap-clean maintainer-clean: distclean
202 true 201 true
@@ -225,6 +224,7 @@ cmdproxy${EXEEXT}: ${srcdir}/cmdproxy.c
225runemacs${EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES) 224runemacs${EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES)
226 $(CC) ${ALL_CFLAGS} $^ -mwindows -o $@ 225 $(CC) ${ALL_CFLAGS} $^ -mwindows -o $@
227 226
228emacs.res: ${srcdir}/emacs.rc ${srcdir}/icons/emacs.ico \ 227## This rule (and file) is duplicated in src/: why?
228emacs.res: emacs.rc ${srcdir}/icons/emacs.ico \
229 ${srcdir}/icons/hand.cur ${srcdir}/$(EMACS_MANIFEST) 229 ${srcdir}/icons/hand.cur ${srcdir}/$(EMACS_MANIFEST)
230 ${WINDRES} -I ${srcdir} -O coff -o $@ $< 230 ${WINDRES} -I ${srcdir} -O coff -o $@ $<
diff --git a/nt/emacs.rc.in b/nt/emacs.rc.in
new file mode 100644
index 00000000000..d2d17b8eb1b
--- /dev/null
+++ b/nt/emacs.rc.in
@@ -0,0 +1,45 @@
1Emacs ICON icons/emacs.ico
232649 CURSOR icons/hand.cur
3#if defined (WIN64) || defined (__x86_64__)
41 24 "emacs-x64.manifest"
5#else
61 24 "emacs-x86.manifest"
7#endif
8
9#ifndef VS_VERSION_INFO
10#define VS_VERSION_INFO 1
11#endif
12
13VS_VERSION_INFO VERSIONINFO
14 FILEVERSION @comma_version@
15 PRODUCTVERSION @comma_version@
16 FILEFLAGSMASK 0x3FL
17#ifdef EMACSDEBUG
18 FILEFLAGS 0x1L
19#else
20 FILEFLAGS 0x0L
21#endif
22 FILEOS 0x40004L
23 FILETYPE 0x1L
24 FILESUBTYPE 0x0L
25BEGIN
26 BLOCK "StringFileInfo"
27 BEGIN
28 BLOCK "040904B0"
29 BEGIN
30 VALUE "CompanyName", "Free Software Foundation\0"
31 VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
32 VALUE "FileVersion", "@comma_space_version@\0"
33 VALUE "InternalName", "Emacs\0"
34 VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
35 VALUE "OriginalFilename", "emacs.exe"
36 VALUE "ProductName", "Emacs\0"
37 VALUE "ProductVersion", "@comma_space_version@\0"
38 VALUE "OLESelfRegister", "\0"
39 END
40 END
41 BLOCK "VarFileInfo"
42 BEGIN
43 VALUE "Translation", 0x409, 1200
44 END
45END
diff --git a/nt/emacsclient.rc.in b/nt/emacsclient.rc.in
new file mode 100644
index 00000000000..5c3b65d752f
--- /dev/null
+++ b/nt/emacsclient.rc.in
@@ -0,0 +1,39 @@
1Emacs ICON icons\emacs.ico
2
3#ifndef VS_VERSION_INFO
4#define VS_VERSION_INFO 1
5#endif
6
7VS_VERSION_INFO VERSIONINFO
8 FILEVERSION @comma_version@
9 PRODUCTVERSION @comma_version@
10 FILEFLAGSMASK 0x3FL
11#ifdef EMACSDEBUG
12 FILEFLAGS 0x1L
13#else
14 FILEFLAGS 0x0L
15#endif
16 FILEOS 0x40004L
17 FILETYPE 0x1L
18 FILESUBTYPE 0x0L
19BEGIN
20 BLOCK "StringFileInfo"
21 BEGIN
22 BLOCK "040904B0"
23 BEGIN
24 VALUE "CompanyName", "Free Software Foundation\0"
25 VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0"
26 VALUE "FileVersion", "@comma_space_version@\0"
27 VALUE "InternalName", "EmacsClient\0"
28 VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
29 VALUE "OriginalFilename", "emacsclientw.exe"
30 VALUE "ProductName", "EmacsClient\0"
31 VALUE "ProductVersion", "@comma_space_version@\0"
32 VALUE "OLESelfRegister", "\0"
33 END
34 END
35 BLOCK "VarFileInfo"
36 BEGIN
37 VALUE "Translation", 0x409, 1200
38 END
39END
diff --git a/src/Makefile.in b/src/Makefile.in
index 7defb4d1a75..4bc5fdfaaf5 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -549,7 +549,7 @@ $(top_srcdir)/aclocal.m4 $(top_srcdir)/configure config.in ../config.status \
549doc.o: buildobj.h 549doc.o: buildobj.h
550 550
551## This rule (and file) is duplicated in nt/: why? 551## This rule (and file) is duplicated in nt/: why?
552emacs.res: $(ntsource)/emacs.rc \ 552emacs.res: ../nt/emacs.rc \
553 $(ntsource)/icons/emacs.ico \ 553 $(ntsource)/icons/emacs.ico \
554 $(ntsource)/icons/hand.cur \ 554 $(ntsource)/icons/hand.cur \
555 $(ntsource)/$(EMACS_MANIFEST) 555 $(ntsource)/$(EMACS_MANIFEST)