@@ -13627,18 +13627,28 @@ 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
- "rule cp\n command = cp $i $out\n"
13633
+ "rule cp\n command = cp $i $out\n\
13634
+ rule touch\n command = touch $out\n"
13633
13635
);
13636
+ let essentials = Ext_buffer.create 1_000 in
13634
13637
files_to_install
13635
13638
|> Queue.iter (fun ({name_sans_extension;syntax_kind; info} : Bsb_db.module_info) ->
13636
13639
let base = Filename.basename name_sans_extension in
13637
- let ns_base = Ext_namespace_encode.make ?ns:namespace base in
13640
+ let dest = Ext_namespace_encode.make ?ns:namespace base in
13638
13641
let ns_origin = Ext_namespace_encode.make ?ns:namespace name_sans_extension in
13639
- oo Literals.suffix_cmi ~dest:ns_base ~src:(bs//ns_origin);
13640
- oo Literals.suffix_cmj ~dest:ns_base ~src:(bs//ns_origin);
13641
- oo Literals.suffix_cmt ~dest:ns_base ~src:(bs//ns_origin);
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
+
13642
13652
let suffix =
13643
13653
match syntax_kind with
13644
13654
| Ml -> Literals.suffix_ml
@@ -13655,16 +13665,23 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
13655
13665
| Reason -> Literals.suffix_rei
13656
13666
| Res -> Literals.suffix_resi in
13657
13667
oo suffix_b ~dest:base ~src:(sb//name_sans_extension);
13658
- oo Literals.suffix_cmti ~dest:ns_base ~src:(bs//ns_origin)
13668
+ oo Literals.suffix_cmti ~dest ~src
13659
13669
);
13660
13670
begin match namespace with
13661
13671
| None -> ()
13662
- | Some x ->
13663
- let src = bs // x in
13664
- oo Literals.suffix_cmi ~dest:x ~src;
13665
- oo Literals.suffix_cmj ~dest:x ~src;
13666
- oo Literals.suffix_cmt ~dest:x ~src
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
13667
13681
end;
13682
+ Ext_buffer.add_char essentials '\n';
13683
+ o "build install.stamp : touch ";
13684
+ Ext_buffer.output_buffer install_oc essentials;
13668
13685
close_out install_oc
13669
13686
13670
13687
let output_ninja_and_namespace_map
@@ -13758,7 +13775,7 @@ let output_ninja_and_namespace_map
13758
13775
let oc = open_out_bin (cwd_lib_bs // Literals.build_ninja) in
13759
13776
mark_rescript oc;
13760
13777
let finger_file =
13761
- fun (x : Bsb_config_types.dependency) -> x.package_install_path //".ninja_log "
13778
+ fun (x : Bsb_config_types.dependency) -> x.package_install_path //"install.stamp "
13762
13779
in
13763
13780
Ext_list.iter bs_dependencies (fun x ->
13764
13781
Bsb_ninja_targets.output_finger Bsb_ninja_global_vars.g_finger
0 commit comments