Skip to content

Commit eb83f46

Browse files
committedOct 23, 2020
tweak dyndep
1 parent b8d18f3 commit eb83f46

File tree

3 files changed

+10
-26
lines changed

3 files changed

+10
-26
lines changed
 

‎jscomp/bsb/bsb_ninja_rule.ml

+5-6
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ let get_name (x : t) oc = x.name oc
3737
let print_rule (oc : out_channel)
3838
?description
3939
?(restat : unit option)
40-
?dyndep
40+
?(dyndep : unit option)
4141
~command
4242
name =
4343
output_string oc "rule "; output_string oc name ; output_string oc "\n";
4444
output_string oc " command = "; output_string oc command; output_string oc "\n";
45-
Ext_option.iter dyndep (fun f ->
46-
output_string oc " dyndep = "; output_string oc f; output_string oc "\n"
47-
);
45+
(if dyndep <> None then
46+
output_string oc " dyndep = 1\n");
4847
(if restat <> None then
4948
output_string oc " restat = 1\n");
5049
begin match description with
@@ -254,14 +253,14 @@ let make_custom_rules
254253
~command:(mk_ml_cmj_cmd
255254
~read_cmi ~is_dev:false
256255
~postbuild)
257-
~dyndep:"$in_e.d"
256+
~dyndep:()
258257
~restat:() (* Always restat when having mli *)
259258
name,
260259
define
261260
~command:(mk_ml_cmj_cmd
262261
~read_cmi ~is_dev:true
263262
~postbuild)
264-
~dyndep:"$in_e.d"
263+
~dyndep:()
265264
~restat:() (* Always restat when having mli *)
266265
(name ^ "_dev")
267266
in

‎jscomp/bsb/bsb_ninja_targets.ml

-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ let oc_list xs oc =
2727
Ext_list.iter xs (fun s -> output_string oc Ext_string.single_space ; output_string oc s)
2828

2929
let output_build
30-
(* ?(order_only_deps=[]) *)
3130
~outputs
3231
~inputs
3332
~rule
@@ -38,12 +37,6 @@ let output_build
3837
output_string oc " : ";
3938
output_string oc rule;
4039
oc_list inputs oc;
41-
(* if order_only_deps <> [] then
42-
begin
43-
output_string oc " ||";
44-
oc_list order_only_deps oc
45-
end
46-
; *)
4740
output_string oc "\n"
4841

4942
let phony ?(order_only_deps=[]) ~inputs ~output oc =

‎lib/4.06.1/bsb.ml

+5-13
Original file line numberDiff line numberDiff line change
@@ -13058,14 +13058,13 @@ let get_name (x : t) oc = x.name oc
1305813058
let print_rule (oc : out_channel)
1305913059
?description
1306013060
?(restat : unit option)
13061-
?dyndep
13061+
?(dyndep : unit option)
1306213062
~command
1306313063
name =
1306413064
output_string oc "rule "; output_string oc name ; output_string oc "\n";
1306513065
output_string oc " command = "; output_string oc command; output_string oc "\n";
13066-
Ext_option.iter dyndep (fun f ->
13067-
output_string oc " dyndep = "; output_string oc f; output_string oc "\n"
13068-
);
13066+
(if dyndep <> None then
13067+
output_string oc " dyndep = 1\n");
1306913068
(if restat <> None then
1307013069
output_string oc " restat = 1\n");
1307113070
begin match description with
@@ -13275,14 +13274,14 @@ let make_custom_rules
1327513274
~command:(mk_ml_cmj_cmd
1327613275
~read_cmi ~is_dev:false
1327713276
~postbuild)
13278-
~dyndep:"$in_e.d"
13277+
~dyndep:()
1327913278
~restat:() (* Always restat when having mli *)
1328013279
name,
1328113280
define
1328213281
~command:(mk_ml_cmj_cmd
1328313282
~read_cmi ~is_dev:true
1328413283
~postbuild)
13285-
~dyndep:"$in_e.d"
13284+
~dyndep:()
1328613285
~restat:() (* Always restat when having mli *)
1328713286
(name ^ "_dev")
1328813287
in
@@ -13414,7 +13413,6 @@ let oc_list xs oc =
1341413413
Ext_list.iter xs (fun s -> output_string oc Ext_string.single_space ; output_string oc s)
1341513414

1341613415
let output_build
13417-
(* ?(order_only_deps=[]) *)
1341813416
~outputs
1341913417
~inputs
1342013418
~rule
@@ -13425,12 +13423,6 @@ let output_build
1342513423
output_string oc " : ";
1342613424
output_string oc rule;
1342713425
oc_list inputs oc;
13428-
(* if order_only_deps <> [] then
13429-
begin
13430-
output_string oc " ||";
13431-
oc_list order_only_deps oc
13432-
end
13433-
; *)
1343413426
output_string oc "\n"
1343513427

1343613428
let phony ?(order_only_deps=[]) ~inputs ~output oc =

0 commit comments

Comments
 (0)
Please sign in to comment.