Skip to content

Commit

Permalink
Rename libdash library to avoid name collision in dune (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgree authored Feb 4, 2024
1 parent c805325 commit a39be0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
builtins.h nodes.h syntax.h token.h token_vars.h
)
(action
(setenv CC "%{cc}"
(bash
"\
\n set -e\
Expand All @@ -17,7 +18,7 @@
\n cp lib/libdash.a libdash.a\
\n cp lib/dlldash.so dlldash.so\
\n cp src/{builtins,nodes,syntax,token,token_vars}.h .\
\n")))
\n"))))

(subdir src
(rule
Expand Down
7 changes: 5 additions & 2 deletions ocaml/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
(public_names shell_to_json json_to_shell)
(modules shell_to_json json_to_shell ast_json)
(modes (native exe))
(foreign_archives ../dash)
(libraries libdash yojson atdgen))

(rule (copy ../dlldash.so dlldash_native.so))
(rule (copy ../libdash.a libdash_native.a))

(library
(name libdash)
(public_name libdash)
(modes native)
(modules (:standard \ json_to_shell shell_to_json ast_json))
(libraries ctypes ctypes.foreign)
(foreign_archives dash_native)
(ctypes
(external_library_name dash)
(build_flags_resolver (vendored (c_flags :standard) (c_library_flags :standard)))
(build_flags_resolver vendored)
(deps (glob_files ../src/*.h) ../src/builtins.h ../src/nodes.h ../src/syntax.h ../src/token.h ../src/token_vars.h)
(headers (preamble
"\
Expand Down

0 comments on commit a39be0e

Please sign in to comment.