Subject: [PATCH] Add support for building tree-sitter modules with MinGW
From: Randy Taylor <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 19 Jan 2023 14:28:20 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

X-Debbugs-CC: [email-masked]

See attached patch.

I think there was a bug report about supporting building tree-sitter modules on Windows but I can't find it.

From 23750a5d35a8be6762cdbc7650afdbda3755267b Mon Sep 17 00:00:00 2001
From: Randy Taylor <[email-masked]>
Date: Thu, 19 Jan 2023 09:16:55 -0500
Subject: [PATCH] Add support for building tree-sitter modules with MinGW

* admin/notes/tree-sitter/build-module/build.sh: Add support for
building tree-sitter modules with MinGW.
---
 admin/notes/tree-sitter/build-module/build.sh | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index f0962940287..9dc674237ca 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -3,12 +3,17 @@
 lang=$1
 topdir="$PWD"
 
-if [ $(uname) == "Darwin" ]
-then
-    soext="dylib"
-else
-    soext="so"
-fi
+case $(uname) in
+    "Darwin")
+        soext="dylib"
+        ;;
+    *"MINGW"*)
+        soext="dll"
+        ;;
+    *)
+        soext="so"
+        ;;
+esac
 
 echo "Building ${lang}"
 
-- 
2.39.1