+2014-11-22 Glenn Morris <rgm@gnu.org>
+
+ 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.
+
2014-11-19 Dani Moncayo <dmoncayo@gmail.com>
* build-aux/msys-to-w32: Simplify implementation and docstring;
+2014-11-22 Glenn Morris <rgm@gnu.org>
+
+ * admin.el (set-version): No more need to update nt/*.rc.
+ * authors.el (authors-renamed-files-alist): Add .rc.in files.
+
2014-11-16 Glenn Morris <rgm@gnu.org>
* update_autogen: Auto-detect VCS in use.
(rx (and bol "#" (0+ blank) "define" (1+ blank)
"VERSION" (1+ blank) "\""
(submatch (1+ (in "0-9."))))))
+ ;; TODO: msdos could easily extract the version number from
+ ;; configure.ac with sed, rather than duplicating the information.
(set-version-in-file root "msdos/sed2v2.inp" version
(rx (and bol "/^#undef " (1+ not-newline)
"define VERSION" (1+ space) "\""
(set-version-in-file root "nt/makefile.w32-in" version
(rx (and "VERSION" (0+ space) "=" (0+ space)
(submatch (1+ (in "0-9."))))))
- ;; nt/emacs.rc also contains the version number, but in an awkward
- ;; format. It must contain four components, separated by commas, and
- ;; in two places those commas are followed by space, in two other
- ;; places they are not.
- (let* ((version-components (append (split-string version "\\.")
- '("0" "0")))
- (comma-version
- (concat (car version-components) ","
- (cadr version-components) ","
- (cadr (cdr version-components)) ","
- (cadr (cdr (cdr version-components)))))
- (comma-space-version
- (concat (car version-components) ", "
- (cadr version-components) ", "
- (cadr (cdr version-components)) ", "
- (cadr (cdr (cdr version-components))))))
- (set-version-in-file root "nt/emacs.rc" comma-version
- (rx (and "FILEVERSION" (1+ space)
- (submatch (1+ (in "0-9,"))))))
- (set-version-in-file root "nt/emacs.rc" comma-version
- (rx (and "PRODUCTVERSION" (1+ space)
- (submatch (1+ (in "0-9,"))))))
- (set-version-in-file root "nt/emacs.rc" comma-space-version
- (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
- ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
- (set-version-in-file root "nt/emacs.rc" comma-space-version
- (rx (and "\"ProductVersion\"" (0+ space) ?,
- (0+ space) ?\" (submatch (1+ (in "0-9, ")))
- "\\0\"")))
- ;; Likewise for emacsclient.rc
- (set-version-in-file root "nt/emacsclient.rc" comma-version
- (rx (and "FILEVERSION" (1+ space)
- (submatch (1+ (in "0-9,"))))))
- (set-version-in-file root "nt/emacsclient.rc" comma-version
- (rx (and "PRODUCTVERSION" (1+ space)
- (submatch (1+ (in "0-9,"))))))
- (set-version-in-file root "nt/emacsclient.rc" comma-space-version
- (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
- ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
- (set-version-in-file root "nt/emacsclient.rc" comma-space-version
- (rx (and "\"ProductVersion\"" (0+ space) ?,
- (0+ space) ?\" (submatch (1+ (in "0-9, ")))
- "\\0\"")))
;; Major version only.
(when (string-match "\\([0-9]\\{2,\\}\\)" version)
(setq version (match-string 1 version))
("paths.h-dist" . "epaths.in")
("paths.h.in" . "epaths.in")
("paths.in" . "epaths.in")
+ ("emacs.rc" . "emacs.rc.in")
+ ("emacsclient.rc" . "emacsclient.rc.in")
("patch1" . "sed1.inp")
("INSTALL.MSYS" . "INSTALL")
("server.c" . "emacsserver.c")
case $opsys in
mingw32)
AC_DEFINE(config_opsysfile, <ms-w32.h>, [])
+
+ dnl Construct something of the form "24,4,0,0" with 4 components.
+ comma_version=`echo "$version.0.0" | sed -e 's/\./,/g' -e 's/^\([[^,]]*,[[^,]]*,[[^,]]*,[[^,]]*\).*/\1/'`
+
+ comma_space_version=`echo "$comma_version" | sed 's/,/, /g'`
+
+ AC_SUBST(comma_version)
+ AC_SUBST(comma_space_version)
+ AC_CONFIG_FILES([nt/emacs.rc nt/emacsclient.rc])
;;
esac
2014-11-22 Glenn Morris <rgm@gnu.org>
+ * Makefile.in (emacsclient.res): Update deps for nt/emacsclient.rc
+ now being in the build directory, not the source directory.
+
* Makefile.in (emacsclient.res): Add dependency on icons/emacs.ico.
2014-10-20 Glenn Morris <rgm@gnu.org>
-DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
$< $(LOADLIBES) $(NTLIB) -o $@
-emacsclient.res: $(NTINC)/../emacsclient.rc ${srcdir}/icons/emacs.ico
+emacsclient.res: ../nt/emacsclient.rc ${srcdir}/icons/emacs.ico
$(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $<
## Makefile ends here.
echo "Making links to \`nt'"
(cd nt
- ln emacs-x86.manifest emacs-x64.manifest emacs.rc ../${tempdir}/nt
- ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt
+ ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt
+ ln config.nt emacs-src.tags ../${tempdir}/nt
ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
- ln Makefile.in gnulib.mk ../${tempdir}/nt
+ ln *.in gnulib.mk ../${tempdir}/nt
ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt)
2014-11-22 Glenn Morris <rgm@gnu.org>
+ * emacs.rc.in, emacsclient.rc.in: Rename from emacs.rc, emacsclient.rc.
+ Let configure generate the real files, and set the version numbers.
+ * Makefile.in (distclean): Delete *.rc.
+ (emacs.res): Update deps for nt/emacsclient.rc now being in the
+ build directory, not the source directory.
+
* Makefile.in (emacs.res): Add dependency on icons/hand.cur.
2014-11-18 Glenn Morris <rgm@gnu.org>
-rm -f ${EXE_FILES}
distclean: clean
- -rm -f TAGS
- -rm -f Makefile
+ -rm -f TAGS Makefile *.rc
bootstrap-clean maintainer-clean: distclean
true
runemacs${EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES)
$(CC) ${ALL_CFLAGS} $^ -mwindows -o $@
-emacs.res: ${srcdir}/emacs.rc ${srcdir}/icons/emacs.ico \
+## This rule (and file) is duplicated in src/: why?
+emacs.res: emacs.rc ${srcdir}/icons/emacs.ico \
${srcdir}/icons/hand.cur ${srcdir}/$(EMACS_MANIFEST)
${WINDRES} -I ${srcdir} -O coff -o $@ $<
--- /dev/null
+Emacs ICON icons/emacs.ico
+32649 CURSOR icons/hand.cur
+#if defined (WIN64) || defined (__x86_64__)
+1 24 "emacs-x64.manifest"
+#else
+1 24 "emacs-x86.manifest"
+#endif
+
+#ifndef VS_VERSION_INFO
+#define VS_VERSION_INFO 1
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @comma_version@
+ PRODUCTVERSION @comma_version@
+ FILEFLAGSMASK 0x3FL
+#ifdef EMACSDEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "Free Software Foundation\0"
+ VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
+ VALUE "FileVersion", "@comma_space_version@\0"
+ VALUE "InternalName", "Emacs\0"
+ VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
+ VALUE "OriginalFilename", "emacs.exe"
+ VALUE "ProductName", "Emacs\0"
+ VALUE "ProductVersion", "@comma_space_version@\0"
+ VALUE "OLESelfRegister", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
--- /dev/null
+Emacs ICON icons\emacs.ico
+
+#ifndef VS_VERSION_INFO
+#define VS_VERSION_INFO 1
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @comma_version@
+ PRODUCTVERSION @comma_version@
+ FILEFLAGSMASK 0x3FL
+#ifdef EMACSDEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "Free Software Foundation\0"
+ VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0"
+ VALUE "FileVersion", "@comma_space_version@\0"
+ VALUE "InternalName", "EmacsClient\0"
+ VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
+ VALUE "OriginalFilename", "emacsclientw.exe"
+ VALUE "ProductName", "EmacsClient\0"
+ VALUE "ProductVersion", "@comma_space_version@\0"
+ VALUE "OLESelfRegister", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
doc.o: buildobj.h
## This rule (and file) is duplicated in nt/: why?
-emacs.res: $(ntsource)/emacs.rc \
+emacs.res: ../nt/emacs.rc \
$(ntsource)/icons/emacs.ico \
$(ntsource)/icons/hand.cur \
$(ntsource)/$(EMACS_MANIFEST)