@@ -13627,7 +13627,8 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
13627
13627
let bs = ".."//"bs" in
13628
13628
let sb = ".."//".." in
13629
13629
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"
13631
13632
else
13632
13633
"rule cp\n command = cp $i $out\n\
13633
13634
rule touch\n command = touch $out\n"
@@ -13636,17 +13637,18 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
13636
13637
files_to_install
13637
13638
|> Queue.iter (fun ({name_sans_extension;syntax_kind; info} : Bsb_db.module_info) ->
13638
13639
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
13640
13641
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
+
13650
13652
let suffix =
13651
13653
match syntax_kind with
13652
13654
| Ml -> Literals.suffix_ml
@@ -13663,22 +13665,21 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
13663
13665
| Reason -> Literals.suffix_rei
13664
13666
| Res -> Literals.suffix_resi in
13665
13667
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
13667
13669
);
13668
13670
begin match namespace with
13669
13671
| 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
13680
13681
end;
13681
- Ext_buffer.add_string essentials "\n" ;
13682
+ Ext_buffer.add_char essentials '\n' ;
13682
13683
o "build install.stamp : touch ";
13683
13684
Ext_buffer.output_buffer install_oc essentials;
13684
13685
close_out install_oc
0 commit comments