@@ -117,17 +117,18 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
117
117
files_to_install
118
118
|> Queue. iter (fun ({name_sans_extension;syntax_kind; info} : Bsb_db.module_info ) ->
119
119
let base = Filename. basename name_sans_extension in
120
- let ns_base = Ext_namespace_encode. make ?ns:namespace base in
120
+ let dest = Ext_namespace_encode. make ?ns:namespace base in
121
121
let ns_origin = Ext_namespace_encode. make ?ns:namespace name_sans_extension in
122
- oo Literals. suffix_cmi ~dest: ns_base ~src: (bs// ns_origin);
123
- oo Literals. suffix_cmj ~dest: ns_base ~src: (bs// ns_origin);
124
- oo Literals. suffix_cmt ~dest: ns_base ~src: (bs// ns_origin);
125
- Ext_buffer. add_string essentials ns_base ;
126
- Ext_buffer. add_string essentials Literals. suffix_cmi;
127
- Ext_buffer. add_string essentials " " ;
128
- Ext_buffer. add_string essentials ns_base ;
129
- Ext_buffer. add_string essentials Literals. suffix_cmj;
130
- Ext_buffer. add_string essentials " " ;
122
+ let src = bs// ns_origin in
123
+ oo Literals. suffix_cmi ~dest ~src ;
124
+ oo Literals. suffix_cmj ~dest ~src ;
125
+ oo Literals. suffix_cmt ~dest ~src ;
126
+
127
+ Ext_buffer. add_string essentials dest ;
128
+ Ext_buffer. add_string_char essentials Literals. suffix_cmi ' ' ;
129
+ Ext_buffer. add_string essentials dest ;
130
+ Ext_buffer. add_string_char essentials Literals. suffix_cmj ' ' ;
131
+
131
132
let suffix =
132
133
match syntax_kind with
133
134
| Ml -> Literals. suffix_ml
@@ -144,22 +145,21 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
144
145
| Reason -> Literals. suffix_rei
145
146
| Res -> Literals. suffix_resi in
146
147
oo suffix_b ~dest: base ~src: (sb// name_sans_extension);
147
- oo Literals. suffix_cmti ~dest: ns_base ~src: (bs // ns_origin)
148
+ oo Literals. suffix_cmti ~dest ~src
148
149
);
149
150
begin match namespace with
150
151
| None -> ()
151
- | Some x ->
152
- let src = bs // x in
153
- oo Literals. suffix_cmi ~dest: x ~src ;
154
- oo Literals. suffix_cmj ~dest: x ~src ;
155
- oo Literals. suffix_cmt ~dest: x ~src ;
156
- Ext_buffer. add_string essentials x ;
157
- Ext_buffer. add_string essentials Literals. suffix_cmi;
158
- Ext_buffer. add_string essentials " " ;
159
- Ext_buffer. add_string essentials x ;
160
- Ext_buffer. add_string essentials Literals. suffix_cmj;
152
+ | Some dest ->
153
+ let src = bs // dest in
154
+ oo Literals. suffix_cmi ~dest ~src ;
155
+ oo Literals. suffix_cmj ~dest ~src ;
156
+ oo Literals. suffix_cmt ~dest ~src ;
157
+ Ext_buffer. add_string essentials dest ;
158
+ Ext_buffer. add_string_char essentials Literals. suffix_cmi ' ' ;
159
+ Ext_buffer. add_string essentials dest ;
160
+ Ext_buffer. add_string essentials Literals. suffix_cmj
161
161
end ;
162
- Ext_buffer. add_string essentials " \n " ;
162
+ Ext_buffer. add_char essentials '\n' ;
163
163
o " build install.stamp : touch " ;
164
164
Ext_buffer. output_buffer install_oc essentials;
165
165
close_out install_oc
0 commit comments