Skip to content

Commit

Permalink
coq-metacoq-template: Fix line ending issues with generated code on W…
Browse files Browse the repository at this point in the history
…indows
  • Loading branch information
MSoegtropIMC committed Sep 30, 2022
1 parent ed3fd0c commit b0afc73
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 838930ef5983c0e19bd9e12ddb5b12cf5b367c8e Mon Sep 17 00:00:00 2001
From: Michael Soegtrop <[email protected]>
Date: Fri, 30 Sep 2022 09:15:08 +0200
Subject: [PATCH] Fix line ending issues with generated code on Windows

---
template-coq/update_plugin.sh | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/template-coq/update_plugin.sh b/template-coq/update_plugin.sh
index 9b3d2a5f..1842cfde 100755
--- a/template-coq/update_plugin.sh
+++ b/template-coq/update_plugin.sh
@@ -12,6 +12,12 @@ then
echo "Renaming files to camelCase"
(cd gen-src; ./to-lower.sh)
rm -f gen-src/*.d gen-src/*.cm*
+ echo "Prepare line endings for patching (for Windows)"
+ for f in gen-src/*.ml*
+ do
+ tr -d '\r' < "$f" > tmp
+ mv -f tmp $f
+ done
# Fix an extraction bug: wrong type annotation on eq_equivalence
patch -N -p0 < extraction.patch
patch -N -p0 < specFloat.patch
--
2.37.3

3 changes: 3 additions & 0 deletions released/packages/coq-metacoq-template/coq-metacoq-template.1.1+8.16/opam
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ authors: ["Abhishek Anand <[email protected]>"
"Théo Winterhalter <[email protected]>"
]
license: "MIT"
patches: [
"0001-Fix-line-ending-issues-with-generated-code-on-Window.patch"
]
build: [
["bash" "./configure.sh"]
[make "-j" "%{jobs}%" "template-coq"]
Expand Down

0 comments on commit b0afc73

Please sign in to comment.