This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,49 @@
(library
(name foobar)
(libraries bytes)
(public_name foobar)
(synopsis "contains \"quotes\""))
(library
(name foobar_baz)
(public_name foobar.baz)
(libraries bytes)
(modes byte)
(synopsis "sub library with modes set to byte"))
(library
(name foobar_runtime_lib2)
(js_of_ocaml
(javascript_files foobar_runtime.js foobar_runtime2.js))
(wasm_of_ocaml
(javascript_files foobar_runtime.js foobar_runtime2.js)
(wasm_files foobar_runtime.wat foobar_runtime2.wat))
(public_name foobar.runtime-lib2)
(synopsis "runtime library for foobar.rewriter2"))
(library
(name foobar_rewriter)
(synopsis "ppx rewriter")
(libraries foobar foobar_rewriter2)
(public_name foobar.rewriter)
(ppx_runtime_libraries foobar_baz)
(kind ppx_rewriter))
;; The ppx runtime libraries to this for library must end up in the requires(-ppx_driver)
;; of foobar.rewriter
(library
(name foobar_rewriter2)
(synopsis "ppx rewriter expander")
(libraries foobar)
(public_name foobar.rewriter2)
(ppx_runtime_libraries foobar_runtime_lib2))
(library
(name foobar_ppd)
(public_name foobar.ppd)
(synopsis "pp'd with a rewriter")
(libraries foobar)
(preprocess (pps foobar_rewriter)))
(rule (alias runtest)
(action (echo "%{read:META.foobar}")))

View file

@ -0,0 +1 @@
(lang dune 3.17)

View file

@ -0,0 +1,78 @@
$ dune runtest --force
description = "contains \"quotes\""
requires = "bytes"
archive(byte) = "foobar.cma"
archive(native) = "foobar.cmxa"
plugin(byte) = "foobar.cma"
plugin(native) = "foobar.cmxs"
package "baz" (
directory = "baz"
description = "sub library with modes set to byte"
requires = "bytes"
archive(byte) = "foobar_baz.cma"
archive(native) = ""
plugin(byte) = "foobar_baz.cma"
plugin(native) = ""
)
package "ppd" (
directory = "ppd"
description = "pp'd with a rewriter"
requires = "foobar foobar.baz foobar.runtime-lib2"
archive(byte) = "foobar_ppd.cma"
archive(native) = "foobar_ppd.cmxa"
plugin(byte) = "foobar_ppd.cma"
plugin(native) = "foobar_ppd.cmxs"
)
package "rewriter" (
directory = "rewriter"
description = "ppx rewriter"
requires(ppx_driver) = "foobar foobar.rewriter2"
archive(ppx_driver,byte) = "foobar_rewriter.cma"
archive(ppx_driver,native) = "foobar_rewriter.cmxa"
plugin(ppx_driver,byte) = "foobar_rewriter.cma"
plugin(ppx_driver,native) = "foobar_rewriter.cmxs"
# This is what dune uses to find out the runtime dependencies of
# a preprocessor
ppx_runtime_deps = "foobar.baz"
# This line makes things transparent for people mixing preprocessors
# and normal dependencies
requires(-ppx_driver) = "foobar.baz foobar.runtime-lib2"
ppx(-ppx_driver,-custom_ppx) = "./ppx.exe --as-ppx"
library_kind = "ppx_rewriter"
)
package "rewriter2" (
directory = "rewriter2"
description = "ppx rewriter expander"
requires = "foobar"
archive(byte) = "foobar_rewriter2.cma"
archive(native) = "foobar_rewriter2.cmxa"
plugin(byte) = "foobar_rewriter2.cma"
plugin(native) = "foobar_rewriter2.cmxs"
# This is what dune uses to find out the runtime dependencies of
# a preprocessor
ppx_runtime_deps = "foobar.runtime-lib2"
)
package "runtime-lib2" (
directory = "runtime-lib2"
description = "runtime library for foobar.rewriter2"
requires = ""
archive(byte) = "foobar_runtime_lib2.cma"
archive(native) = "foobar_runtime_lib2.cmxa"
plugin(byte) = "foobar_runtime_lib2.cma"
plugin(native) = "foobar_runtime_lib2.cmxs"
jsoo_runtime = "foobar_runtime.js foobar_runtime2.js"
wasmoo_runtime =
"foobar_runtime.js
foobar_runtime2.js
foobar_runtime.wat
foobar_runtime2.wat"
)
package "sub" (
directory = "sub"
description = "sub library in a sub dir"
requires = "bytes"
archive(byte) = "foobar_sub.cma"
archive(native) = ""
plugin(byte) = "foobar_sub.cma"
plugin(native) = ""
)

View file

@ -0,0 +1,6 @@
(library
(name foobar_sub)
(public_name foobar.sub)
(libraries bytes)
(modes byte)
(synopsis "sub library in a sub dir"))