~ chicken-core (chicken-5) 70909567dd8d00184ec88188d425b840837fab5a
commit 70909567dd8d00184ec88188d425b840837fab5a
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Fri Nov 22 18:33:30 2019 +0100
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Sun Nov 24 14:59:03 2019 +1300
Clean up drive changing by using "cd /d" on Windows
This is much simpler than d2dcb462 and less likely to cause issues in
the future because the explicit change-drive-command is easier to forget
when adding new calls to cd-command, especially because we don't tend to
test on Windows much. It's also shorter and easier to read.
Signed-off-by: Evan Hanson <evhan@foldling.org>
diff --git a/egg-compile.scm b/egg-compile.scm
index 149f25a9..c18c8c14 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -98,12 +98,10 @@
((unix) "rm -f")
((windows) "del /f /q")))
-(define (cd-command platform) "cd")
-
-(define (change-drive-command platform drive)
+(define (cd-command platform)
(case platform
- ((unix) #f)
- ((windows) drive))) ; Should already include the colon
+ ((unix) "cd")
+ ((windows) "cd /d")))
(define (uses-compiled-import-library? mode)
(not (and (eq? mode 'host) staticbuild)))
@@ -1090,10 +1088,6 @@
(with-output-to-file dest
(lambda ()
(prefix platform)
- (receive (drive root parts) (decompose-directory srcdir)
- (let ((cmd (change-drive-command platform drive)))
- (when cmd
- (print cmd))))
(print (cd-command platform) " " (qs* srcdir platform #t))
(for-each
(lambda (cmd) (cmd srcdir platform))
Trap