@@ -13627,7 +13627,8 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
1362713627 let bs = ".."//"bs" in
1362813628 let sb = ".."//".." in
1362913629 o (if Ext_sys.is_windows_or_cygwin then
13630- "rule cp\n command = cmd.exe /C copy /Y $i $out >NUL\n"
13630+ "rule cp\n command = cmd.exe /C copy /Y $i $out >NUL\n\
13631+ rule touch\n command = cmd.exe /C type nul >>$out & copy $out+,, >NUL\n"
1363113632 else
1363213633 "rule cp\n command = cp $i $out\n\
1363313634 rule touch\n command = touch $out\n"
@@ -13636,17 +13637,18 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
1363613637 files_to_install
1363713638 |> Queue.iter (fun ({name_sans_extension;syntax_kind; info} : Bsb_db.module_info) ->
1363813639 let base = Filename.basename name_sans_extension in
13639- let ns_base = Ext_namespace_encode.make ?ns:namespace base in
13640+ let dest = Ext_namespace_encode.make ?ns:namespace base in
1364013641 let ns_origin = Ext_namespace_encode.make ?ns:namespace name_sans_extension in
13641- oo Literals.suffix_cmi ~dest:ns_base ~src:(bs//ns_origin);
13642- oo Literals.suffix_cmj ~dest:ns_base ~src:(bs//ns_origin);
13643- oo Literals.suffix_cmt ~dest:ns_base ~src:(bs//ns_origin);
13644- Ext_buffer.add_string essentials ns_base ;
13645- Ext_buffer.add_string essentials Literals.suffix_cmi;
13646- Ext_buffer.add_string essentials " ";
13647- Ext_buffer.add_string essentials ns_base ;
13648- Ext_buffer.add_string essentials Literals.suffix_cmj;
13649- Ext_buffer.add_string essentials " ";
13642+ let src = bs//ns_origin in
13643+ oo Literals.suffix_cmi ~dest ~src;
13644+ oo Literals.suffix_cmj ~dest ~src;
13645+ oo Literals.suffix_cmt ~dest ~src;
13646+
13647+ Ext_buffer.add_string essentials dest ;
13648+ Ext_buffer.add_string_char essentials Literals.suffix_cmi ' ';
13649+ Ext_buffer.add_string essentials dest ;
13650+ Ext_buffer.add_string_char essentials Literals.suffix_cmj ' ';
13651+
1365013652 let suffix =
1365113653 match syntax_kind with
1365213654 | Ml -> Literals.suffix_ml
@@ -13663,22 +13665,21 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
1366313665 | Reason -> Literals.suffix_rei
1366413666 | Res -> Literals.suffix_resi in
1366513667 oo suffix_b ~dest:base ~src:(sb//name_sans_extension);
13666- oo Literals.suffix_cmti ~dest:ns_base ~src:(bs//ns_origin)
13668+ oo Literals.suffix_cmti ~dest ~src
1366713669 );
1366813670 begin match namespace with
1366913671 | None -> ()
13670- | Some x ->
13671- let src = bs // x in
13672- oo Literals.suffix_cmi ~dest:x ~src;
13673- oo Literals.suffix_cmj ~dest:x ~src;
13674- oo Literals.suffix_cmt ~dest:x ~src;
13675- Ext_buffer.add_string essentials x ;
13676- Ext_buffer.add_string essentials Literals.suffix_cmi;
13677- Ext_buffer.add_string essentials " ";
13678- Ext_buffer.add_string essentials x ;
13679- Ext_buffer.add_string essentials Literals.suffix_cmj;
13672+ | Some dest ->
13673+ let src = bs // dest in
13674+ oo Literals.suffix_cmi ~dest ~src;
13675+ oo Literals.suffix_cmj ~dest ~src;
13676+ oo Literals.suffix_cmt ~dest ~src;
13677+ Ext_buffer.add_string essentials dest ;
13678+ Ext_buffer.add_string_char essentials Literals.suffix_cmi ' ';
13679+ Ext_buffer.add_string essentials dest ;
13680+ Ext_buffer.add_string essentials Literals.suffix_cmj
1368013681 end;
13681- Ext_buffer.add_string essentials "\n" ;
13682+ Ext_buffer.add_char essentials '\n' ;
1368213683 o "build install.stamp : touch ";
1368313684 Ext_buffer.output_buffer install_oc essentials;
1368413685 close_out install_oc
0 commit comments