Hi all,

I noticed that on Mingw without MSYS, if you install to a new location
where no previous installation of CHICKEN is, it will block on a question
like "Does \path\to\chicken\share\man\csi.mdoc.1 specify a file name or
directory name on the target (F = file, D = directory)?"
This doesn't happen when you overwrite a previous installation.

After some investigation it turns out that XCOPY has no way to suppress
this question when the target is a file.  In typical Microsoft fashion,
XCOPY has a flag to tell it that the target is always a directory name,
but not a corresponding flag for the _other_ answer.

So instead, let's use COPY.  I've tested, and it works when installing
to either a new location or a location where there already is a CHICKEN
installed.

This patch is only necessary on chicken-5; luckily, the commit that broke
this is not present in the master branch.

Cheers,
Peter
From 92f0dcd553d8a23a8794a60ac01920ead29512da Mon Sep 17 00:00:00 2001
From: Peter Bex <[email protected]>
Date: Sat, 6 May 2017 16:17:01 +0200
Subject: [PATCH] Get rid of interactive prompts during install on mingw.

Due to dae44b93b02118c70c98cfd47041061b66bc0f0f, we now install
manpages to a different target filename than the source filename has.
Because we're using XCOPY, when we're installing to an empty
directory, it asks us whether we intend the target to be a
differently-named target *file*name or a newly-to-create *directory*
under which it should place the file with the original source's
filename.

Because XCOPY has no switch to tell it to force interpretation of the
final path component as a file, only as a directory (sigh,
Windows...), we can't use it.  Luckily, we only ever use the /Y flag,
which COPY also has.  So, COPY is effectively equivalent to XCOPY in
all the situations we use it in.  Therefore, switch to copy instead.
---
 defaults.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/defaults.make b/defaults.make
index 6bf867c..bc66d78 100644
--- a/defaults.make
+++ b/defaults.make
@@ -83,7 +83,7 @@ LINKER ?= $(C_COMPILER)
 ASSEMBLER ?= $(C_COMPILER)
 ifdef WINDOWS_SHELL
 REMOVE_COMMAND ?= del
-INSTALL_PROGRAM ?= xcopy
+INSTALL_PROGRAM ?= copy
 MAKEDIR_COMMAND ?= -mkdir
 else
 REMOVE_COMMAND ?= rm
-- 
2.1.4

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to