From 65f06e745482d7beed246dbf5263b0e449e94579 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Fri, 3 Mar 2017 13:47:51 +0000 Subject: [PATCH] fix --- src/action.ml | 8 +++++++- src/gen_rules.ml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/action.ml b/src/action.ml index aed936b7..a5b649d8 100644 --- a/src/action.ml +++ b/src/action.ml @@ -110,9 +110,15 @@ module Mini_shexp = struct module Unexpanded = struct type t = (String_with_vars.t, String_with_vars.t) Ast.t - let t = Ast.t String_with_vars.t String_with_vars.t let sexp_of_t = Ast.sexp_of_t String_with_vars.sexp_of_t String_with_vars.sexp_of_t + let t sexp = + match sexp with + | Atom _ -> + of_sexp_errorf sexp + "if you meant for this to be executed with bash, write (bash \"...\") instead" + | List _ -> Ast.t String_with_vars.t String_with_vars.t sexp + let fold_vars t ~init ~f = Ast.fold t ~init ~f:(fun acc pat -> String_with_vars.fold ~init:acc pat ~f) diff --git a/src/gen_rules.ml b/src/gen_rules.ml index 9ec623b4..7d7f2eab 100644 --- a/src/gen_rules.ml +++ b/src/gen_rules.ml @@ -241,6 +241,8 @@ module Gen(P : Params) = struct List.map (Lib_db.resolve_selects t ~from:dir lib_deps) ~f:(fun { dst_fn; src_fn } -> let src = Path.relative dir src_fn in let dst = Path.relative dir dst_fn in + Build.path src + >>> Build.action ~targets:[dst] (Copy_and_add_line_directive (src, dst)))