From b1aee01b8c4c6157de4128ece474a6c355217456 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 23 Aug 2020 16:59:41 -0600 Subject: [PATCH] cs: fix cross-compile depdency tracking --- racket/src/ChezScheme/rktboot/make-boot.rkt | 6 +++--- racket/src/cs/c/Makefile.in | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/racket/src/ChezScheme/rktboot/make-boot.rkt b/racket/src/ChezScheme/rktboot/make-boot.rkt index 558dfaa023..f1aa0368af 100644 --- a/racket/src/ChezScheme/rktboot/make-boot.rkt +++ b/racket/src/ChezScheme/rktboot/make-boot.rkt @@ -397,10 +397,10 @@ (when (getenv "MAKE_BOOT_FOR_CROSS") ;; Working bootfiles are not needed for a cross build (only the - ;; ".h" files are needed), so just make dummy files in that case - ;; to let `configure` work + ;; ".h" files are needed), so just touch dummy files in that case + ;; to let `configure` work and to communicate xpatch rebuild (define (touch p) - (unless (file-exists? p) (call-with-output-file* p void))) + (call-with-output-file* p void #:exists 'truncate)) (touch (build-path out-subdir "petite.boot")) (touch (build-path out-subdir "scheme.boot")) (exit)) diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in index 9a7f102922..8a428096e2 100644 --- a/racket/src/cs/c/Makefile.in +++ b/racket/src/cs/c/Makefile.in @@ -162,8 +162,11 @@ scheme-cross: $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older -# than the build-host "scheme.boot" -$(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch: $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot +# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files +XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ + $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot + +$(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch: $(XPATCH_DEPS) $(MAKE) bounce TARGET=build-xpatch-using-host build-xpatch-using-host: