mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Check for go/scm mtime ordering rather than equality.
* am/guilec (install-data-hook): Remove. (guile_install_go_files): New variable. ($(guile_install_go_files)): New dependency. * libguile/load.c (compiled_is_fresh): Check for ordering of STAT_SOURCE and STAT_COMPILED, not equality. * module/ice-9/boot-9.scm (load): Ditto. * module/system/base/compile.scm (call-with-output-file/atomic): Don't set the timestamp of TEMPLATE.
This commit is contained in:
parent
a2a95453eb
commit
fefd60ba4b
4 changed files with 10 additions and 26 deletions
25
am/guilec
25
am/guilec
|
@ -11,24 +11,13 @@ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
|
||||||
|
|
||||||
CLEANFILES = $(GOBJECTS)
|
CLEANFILES = $(GOBJECTS)
|
||||||
|
|
||||||
# Well, shit. We can't have install changing timestamps, can we? But
|
# Make sure source files are installed first, so that the mtime of
|
||||||
# install_sh doesn't know how to preserve timestamps. Soooo, fondle
|
# installed compiled files is greater than that of installed source
|
||||||
# automake to make things happen.
|
# files. See
|
||||||
install-data-hook:
|
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
|
||||||
@$(am__vpath_adj_setup) \
|
# for details.
|
||||||
list='$(nobase_mod_DATA)'; for p in $$list; do \
|
guile_install_go_files = install-nobase_ccacheDATA
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
$(guile_install_go_files): install-nobase_modDATA
|
||||||
$(am__vpath_adj) \
|
|
||||||
echo " touch -r '$$d$$p' '$(DESTDIR)$(moddir)/$$f'"; \
|
|
||||||
touch -r "$$d$$p" "$(DESTDIR)$(moddir)/$$f"; \
|
|
||||||
done
|
|
||||||
@$(am__vpath_adj_setup) \
|
|
||||||
list='$(nobase_ccache_DATA)'; for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
$(am__vpath_adj) \
|
|
||||||
echo " touch -r '$$d$$p' '$(DESTDIR)$(ccachedir)/$$f'"; \
|
|
||||||
touch -r "$$d$$p" "$(DESTDIR)$(ccachedir)/$$f"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
AM_V_GUILEC = $(AM_V_GUILEC_$(V))
|
AM_V_GUILEC = $(AM_V_GUILEC_$(V))
|
||||||
AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
|
AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
|
||||||
|
|
|
@ -614,10 +614,10 @@ compiled_is_fresh (SCM full_filename, SCM compiled_filename)
|
||||||
|
|
||||||
source = scm_to_locale_string (full_filename);
|
source = scm_to_locale_string (full_filename);
|
||||||
compiled = scm_to_locale_string (compiled_filename);
|
compiled = scm_to_locale_string (compiled_filename);
|
||||||
|
|
||||||
if (stat (source, &stat_source) == 0
|
if (stat (source, &stat_source) == 0
|
||||||
&& stat (compiled, &stat_compiled) == 0
|
&& stat (compiled, &stat_compiled) == 0
|
||||||
&& stat_source.st_mtime == stat_compiled.st_mtime)
|
&& stat_source.st_mtime <= stat_compiled.st_mtime)
|
||||||
{
|
{
|
||||||
res = 1;
|
res = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ If there is no handler at all, Guile prints an error and then exits."
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let* ((scmstat (stat name))
|
(let* ((scmstat (stat name))
|
||||||
(gostat (stat go-path #f)))
|
(gostat (stat go-path #f)))
|
||||||
(if (and gostat (= (stat:mtime gostat) (stat:mtime scmstat)))
|
(if (and gostat (>= (stat:mtime gostat) (stat:mtime scmstat)))
|
||||||
go-path
|
go-path
|
||||||
(begin
|
(begin
|
||||||
(if gostat
|
(if gostat
|
||||||
|
|
|
@ -81,11 +81,6 @@
|
||||||
(proc tmp)
|
(proc tmp)
|
||||||
(chmod tmp (logand #o0666 (lognot (umask))))
|
(chmod tmp (logand #o0666 (lognot (umask))))
|
||||||
(close-port tmp)
|
(close-port tmp)
|
||||||
(if reference
|
|
||||||
(let ((st (stat reference)))
|
|
||||||
(utime template
|
|
||||||
(stat:atime st) (stat:mtime st)
|
|
||||||
(stat:atimensec st) (stat:mtimensec st))))
|
|
||||||
(rename-file template filename))
|
(rename-file template filename))
|
||||||
(lambda args
|
(lambda args
|
||||||
(delete-file template)))))))
|
(delete-file template)))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue