From d6277445139d46f83f6703a39ad35acb2f10eb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dimino?= Date: Tue, 28 Feb 2017 23:26:53 +0000 Subject: [PATCH] Fix the interpretation of --- doc/manual.org | 2 +- src/gen_rules.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual.org b/doc/manual.org index ede6553d..13166f72 100644 --- a/doc/manual.org +++ b/doc/manual.org @@ -628,7 +628,7 @@ that are expanded by Jbuilder. Jbuilder supports the following variables: -- =ROOT= is the relative path to the root of the workspace +- =ROOT= is the relative path to the root of the build context - =CC= is the C compiler command line being used in the current build context - =CXX= is the C++ compiler command line being used in the current diff --git a/src/gen_rules.ml b/src/gen_rules.ml index ae414b3a..24de96a0 100644 --- a/src/gen_rules.ml +++ b/src/gen_rules.ml @@ -385,7 +385,7 @@ module Gen(P : Params) = struct let root_var_lookup ~dir var_name = match var_name with - | "ROOT" -> Some (Path.reach ~from:dir Path.root) + | "ROOT" -> Some (Path.reach ~from:dir ctx.build_dir) | _ -> String_map.find var_name dollar_var_map let expand_vars ~dir s =