Compiler: allow for _ in protocol directory name.

This commit is contained in:
Grégoire Henry 2018-07-19 01:53:28 +02:00
parent 9b9c3a1bee
commit 50151c55a1
2 changed files with 10 additions and 5 deletions

View File

@ -5,7 +5,7 @@ let dirname = Filename.basename @@ Filename.dirname @@ Filename.dirname @@ Sys.g
let predefined_version = None (* to be substituted in opam packages *)
let version =
let lib_version =
match predefined_version with
| Some version -> version
| None ->
@ -15,6 +15,8 @@ let version =
failwith "unexpected directory name" ;
String.sub dirname x (n - x)
let version = String.concat "-" (String.split_on_char '_' lib_version)
let () = Format.kasprintf Jbuild_plugin.V1.send {|
(jbuild_version 1)
@ -64,5 +66,6 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {|
-warn-error -a+8))
(modules (Registerer))))
|}
version version version version version version version version
version version version version
version lib_version lib_version lib_version
version lib_version version lib_version
lib_version lib_version version lib_version

View File

@ -16,7 +16,7 @@ let dirname = Filename.basename @@ Filename.dirname @@ Sys.getcwd ()
let predefined_version = None (* to be substituted in opam packages *)
let version =
let lib_version =
match predefined_version with
| Some version -> version
| None ->
@ -26,6 +26,8 @@ let version =
failwith "unexpected directory name" ;
String.sub dirname x (n - x)
let version = String.concat "-" (String.split_on_char '_' lib_version)
let path =
match predefined_version with
| None -> "src/proto_" ^ version ^ "/lib_protocol"
@ -80,6 +82,6 @@ let () = Format.kasprintf Jbuild_plugin.V1.send {|
(action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${^}))))
|}
version version version
lib_version version lib_version
Format.(pp_print_list (fun ppf -> Format.fprintf ppf "%S"))
sources