Unbundle libyaml
[fedora-reviews.git] / ocaml-yaml / unbundled-dune
diff --git a/ocaml-yaml/unbundled-dune b/ocaml-yaml/unbundled-dune
new file mode 100644 (file)
index 0000000..e1351f9
--- /dev/null
@@ -0,0 +1,20 @@
+(library
+ (name yaml_c)
+ (public_name yaml.c)
+ (preprocess no_preprocessing)
+ (flags
+  (:standard -safe-string))
+ (foreign_archives yaml_c_stubs))
+
+(rule
+ (targets libyaml_c_stubs%{ext_lib} dllyaml_c_stubs%{ext_dll})
+ (deps dummy%{ext_obj})
+ (action
+  (run ocamlmklib -o yaml_c_stubs %{deps} -lyaml)))
+
+(rule
+ (targets dummy%{ext_obj})
+ (deps
+  (:c dummy.c))
+ (action
+  (run %{cc} %{read-lines:../config/cflags} -Wall -DHAVE_CONFIG_H -I. -c %{c})))