[Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])],
[ac_enable_gtk_deprecation_warnings="${enableval}"],[])
-AC_ARG_ENABLE(deterministic-dump,
-[AS_HELP_STRING([--enable-deterministic-dump],
- [Make dumping deterministic by removing system-specific
- information from the dump, such as host names and
- timestamps.])])
-if test "x${enableval}" = xno ; then
- AC_DEFINE(DETERMINISTIC_DUMP, false,
- [Set this to true to make dumping deterministic.])
-else
- AC_DEFINE(DETERMINISTIC_DUMP, true,
- [Set this to true to make dumping deterministic.])
-fi
+BUILD_DETAILS=
+AC_ARG_ENABLE([build-details],
+ [AS_HELP_STRING([--disable-build-details],
+ [Make the build more deterministic by omitting host
+ names, time stamps, etc. from the output.])],
+ [test "$enableval" = no && BUILD_DETAILS=--no-build-details])
+AC_SUBST([BUILD_DETAILS])
dnl This used to use changequote, but, apart from 'changequote is evil'
dnl per the autoconf manual, we can speed up autoconf somewhat by quoting
the script file as @var{file}. Emacs Lisp then treats the @samp{#!}
on this first line as a comment delimiter.
+@item --no-build-details
+@opindex --no-build-details
+@cindex build details
+@cindex deterministic build
+Omit details like system name and build time from the Emacs executable,
+so that builds are more deterministic.
+
@item -q
@opindex -q
@itemx --no-init-file
and are not able to implement dumping, then Emacs must load
@file{loadup.el} each time it starts.
+@cindex build details
+@cindex deterministic build
+@cindex @option{--disable-build-details} option to @command{configure}
+ By default the dumped @file{emacs} executable records details such
+as the build time and host name. Use the
+@option{--disable-build-details} option of @command{configure} to
+suppress these details, so that building and installing Emacs twice
+from the same sources is more likely to result in identical copies of
+Emacs.
+
@cindex @file{site-load.el}
You can specify additional files to preload by writing a library named
@file{site-load.el} that loads them. You may need to rebuild Emacs
@defvar emacs-build-time
The value of this variable indicates the time at which Emacs was
built. It is a list of four integers, like the value of
-@code{current-time} (@pxref{Time of Day}).
+@code{current-time} (@pxref{Time of Day}), or is @code{nil}
+if the information is not available.
@example
@group
\f
* Installation Changes in Emacs 25.2
++++
+** New configure option ‘--disable-build-details’ attempts to build an
+Emacs that is more likely to be reproducible; that is, if you build
+and install Emacs twice, the second Emacs is a copy of the first.
+Deterministic builds omit the build date from the output of the
+emacs-version and erc-cmd-SV functions, and the leave the following
+variables nil: emacs-build-system, emacs-build-time,
+erc-emacs-build-time.
+
\f
* Startup Changes in Emacs 25.2
(set (make-local-variable 'write-file-functions) new-val))
(defvar erc-emacs-build-time
- (if (stringp emacs-build-time)
+ (if (or (stringp emacs-build-time) (not emacs-build-time))
emacs-build-time
(format-time-string "%Y-%m-%d" emacs-build-time))
- "Time at which Emacs was dumped out.")
+ "Time at which Emacs was dumped out, or nil if not available.")
;; Emacs 21 and XEmacs do not have user-emacs-directory, but XEmacs
;; has user-init-directory.
;; indent-tabs-mode: t
;; tab-width: 8
;; End:
-
(defun erc-cmd-SV ()
"Say the current ERC and Emacs version into channel."
- (erc-send-message (format "I'm using ERC with %s %s (%s%s) of %s."
+ (erc-send-message (format "I'm using ERC with %s %s (%s%s)%s."
(if (featurep 'xemacs) "XEmacs" "GNU Emacs")
emacs-version
system-configuration
x-toolkit-scroll-bars)))
"")
(if (featurep 'multi-tty) ", multi-tty" ""))
- erc-emacs-build-time))
+ (if erc-emacs-build-time
+ (concat " of " erc-emacs-build-time)
+ "")))
t)
(defun erc-cmd-SM ()
"Minor version number of this version of Emacs.
This variable first existed in version 19.23.")
-;; FIXME: The next variable should also be a constant if
-;; `deterministic-dump' is t.
-(defconst emacs-build-time (current-time)
- "Time at which Emacs was dumped out.")
+(defconst emacs-build-system (system-name)
+ "Name of the system on which Emacs was built, or nil if not available.")
-(defconst emacs-build-system
- (if deterministic-dump "elided" (system-name))
- "Name of the system on which Emacs was built.")
+(defconst emacs-build-time (if emacs-build-system (current-time))
+ "Time at which Emacs was dumped out, or nil if not available.")
(defvar motif-version-string)
(defvar gtk-version-string)
to the system configuration; look at `system-configuration' instead."
(interactive "P")
(let ((version-string
- (format (if (not (called-interactively-p 'interactive))
- "GNU Emacs %s (%s%s%s%s)\n of %s"
- "GNU Emacs %s (%s%s%s%s) of %s")
+ (format "GNU Emacs %s (%s%s%s%s)%s"
emacs-version
system-configuration
(cond ((featurep 'motif)
(format ", %s scroll bars"
(capitalize (symbol-name x-toolkit-scroll-bars)))
"")
- (format-time-string "%Y-%m-%d" emacs-build-time))))
+ (if emacs-build-time
+ (format-time-string (concat
+ (if (called-interactively-p
+ 'interactive)
+ "" "\n")
+ " of %Y-%m-%d")
+ emacs-build-time)
+ ""))))
(if here
(insert version-string)
(if (called-interactively-p 'interactive)
RUN_TEMACS = ./temacs
+# Whether builds should contain details. '--no-build-details' or empty.
+BUILD_DETAILS = @BUILD_DETAILS@
+
UNEXEC_OBJ = @UNEXEC_OBJ@
CANNOT_DUMP=@CANNOT_DUMP@
ifeq ($(CANNOT_DUMP),yes)
ln -f temacs$(EXEEXT) $@
else
- LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
+ LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump
$(PAXCTL_if_present) -zex $@
ln -f $@ bootstrap-emacs$(EXEEXT)
endif
ifeq ($(CANNOT_DUMP),yes)
ln -f temacs$(EXEEXT) $@
else
- $(RUN_TEMACS) --batch --load loadup bootstrap
+ $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap
$(PAXCTL_if_present) -zex emacs$(EXEEXT)
mv -f emacs$(EXEEXT) $@
endif
/* True means remove site-lisp directories from load-path. */
bool no_site_lisp;
+/* True means put details like time stamps into builds. */
+bool build_details;
+
/* Name for the server started by the daemon.*/
static char *daemon_name;
--display, -d DISPLAY use X server DISPLAY\n\
",
"\
+--no-build-details do not add build details such as time stamps\n\
--no-desktop do not load a saved desktop\n\
--no-init-file, -q load neither ~/.emacs nor default.el\n\
--no-loadup, -nl do not load loadup.el into bare Emacs\n\
SET_BINARY (fileno (stdout));
#endif /* MSDOS */
- if (DETERMINISTIC_DUMP)
- Vdeterministic_dump = Qt;
-
/* Skip initial setlocale if LC_ALL is "C", as it's not needed in that case.
The build procedure uses this while dumping, to ensure that the
dumped Emacs does not have its system locale tables initialized,
no_site_lisp
= argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
+ build_details = ! argmatch (argv, argc, "-no-build-details",
+ "--no-build-details", 7, NULL, &skip_args);
+
#ifdef HAVE_NS
ns_pool = ns_alloc_autorelease_pool ();
#ifdef NS_IMPL_GNUSTEP
{ "-help", "--help", 90, 0 },
{ "-nl", "--no-loadup", 70, 0 },
{ "-nsl", "--no-site-lisp", 65, 0 },
+ { "-no-build-details", "--no-build-details", 63, 0 },
/* -d must come last before the options handled in startup.el. */
{ "-d", "--display", 60, 1 },
{ "-display", 0, 60, 1 },
Vdynamic_library_alist = Qnil;
Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, Qt);
- DEFVAR_BOOL ("deterministic-dump", Vdeterministic_dump,
- doc: /* If non-nil, attempt to make dumping deterministic by
-avoiding sources of nondeterminism such as absolute file names, the
-hostname, or timestamps. */);
- Vdeterministic_dump = DETERMINISTIC_DUMP ? Qt : Qnil;
- XSYMBOL (intern_c_string ("deterministic-dump"))->constant = 1;
-
#ifdef WINDOWSNT
Vlibrary_cache = Qnil;
staticpro (&Vlibrary_cache);
/* True means remove site-lisp directories from load-path. */
extern bool no_site_lisp;
+/* True means put details like time stamps into builds. */
+extern bool build_details;
+
/* Pipe used to send exit notification to the daemon parent at
startup. On Windows, we use a kernel event instead. */
#ifndef WINDOWSNT
void
init_system_name (void)
{
- if (DETERMINISTIC_DUMP && (might_dump || ! NILP (Vpurify_flag)))
+ if (!build_details)
{
- /* If we're dumping, set the hostname to a literal so that the
- dump is deterministic. */
- Vsystem_name = build_pure_c_string ("elided");
+ /* Set system-name to nil so that the build is deterministic. */
+ Vsystem_name = Qnil;
return;
}
char *hostname_alloc = NULL;