-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: fix coqdep for coq 8.19.2 and enable coq-quickick for Windows
- Loading branch information
1 parent
ff62d7a
commit 57ab9a2
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...ckages/coq-core/coq-core.8.19.2/files/0001-Windows-fix-path-normalization-in-coqdep.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 2b93006118401884a50d62013ce02cb1b7663c22 Mon Sep 17 00:00:00 2001 | ||
From: Michael Soegtrop <[email protected]> | ||
Date: Thu, 3 Oct 2024 10:21:47 +0200 | ||
Subject: [PATCH] Windows: fix path normalization in coqdep | ||
|
||
--- | ||
tools/coqdep/lib/file_util.ml | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/tools/coqdep/lib/file_util.ml b/tools/coqdep/lib/file_util.ml | ||
index 17d8622d78..77e9553810 100644 | ||
--- a/tools/coqdep/lib/file_util.ml | ||
+++ b/tools/coqdep/lib/file_util.ml | ||
@@ -10,8 +10,9 @@ | ||
|
||
let to_relative_path : string -> string = fun full_path -> | ||
if Filename.is_relative full_path then full_path else | ||
- let cwd = String.split_on_char '/' (Sys.getcwd ()) in | ||
- let path = String.split_on_char '/' full_path in | ||
+ let re_delim = if Sys.win32 then "[/\\]" else "/" in | ||
+ let cwd = Str.split_delim (Str.regexp re_delim) (Sys.getcwd ()) in | ||
+ let path = Str.split_delim (Str.regexp re_delim) full_path in | ||
let rec remove_common_prefix l1 l2 = | ||
match (l1, l2) with | ||
| (x1 :: l1, x2 :: l2) when x1 = x2 -> remove_common_prefix l1 l2 | ||
-- | ||
2.45.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters