]> gitweb.factorcode.org Git - factor.git/commitdiff
build-from-source: Add libyaml
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 14 Jan 2023 02:12:11 +0000 (20:12 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 14 Jan 2023 02:12:11 +0000 (20:12 -0600)
extra/build-from-source/build-from-source.factor
extra/build-from-source/windows/windows.factor

index 1d4414a4db65f4c20f975cbfcb9e527448a9469a..4a08ca812e67afdb38d4d1ca79b04465fcbd0be4 100644 (file)
@@ -15,6 +15,10 @@ IN: build-from-source
 : prepend-current-path ( path -- path' )
     current-directory get prepend-path ;
 
+: copy-output-file-as ( name new-name -- )
+    [ prepend-current-path ]
+    [ dll-out-directory prepend-path ] bi* copy-file ;
+
 : copy-output-file ( name -- )
     prepend-current-path dll-out-directory copy-file-into ;
 
index f02db6c08577d9c3cc7314814cc254d8bcd4a7a3..3e366d572c63d2fd733dded7843839b47bb4b367 100644 (file)
@@ -60,6 +60,16 @@ IN: build-from-source.windows
         "sqlite3.dll" copy-output-file
     ] with-updated-git-repo ;
 
+: build-yaml-dll ( -- )
+    "https://github.com/yaml/libyaml.git" [
+        [
+            current-directory get ...
+            { "cmake" "-DBUILD_SHARED_LIBS=ON" ".." } try-process
+            { "msbuild" "yaml.sln" } try-process
+            "Debug/yaml.dll" copy-output-file
+        ] with-build-directory
+    ] with-updated-git-repo ;
+
 : build-zlib-dll ( -- )
     "https://github.com/madler/zlib" [
         check-nmake