From 60ddf07c290b79479284d15b8daaffc86f01bb92 Mon Sep 17 00:00:00 2001 From: Andre Brisco Date: Thu, 1 Aug 2024 15:49:21 -0700 Subject: [PATCH] Account for M4 being generated --- dependency_support/org_gnu_bison/bison.bzl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dependency_support/org_gnu_bison/bison.bzl b/dependency_support/org_gnu_bison/bison.bzl index 73a31d91..7ba48477 100644 --- a/dependency_support/org_gnu_bison/bison.bzl +++ b/dependency_support/org_gnu_bison/bison.bzl @@ -38,7 +38,14 @@ def correct_bison_env_for_action(env, bison): bison.owner.workspace_name, ) - actual = "external/{}".format(bison.owner.workspace_name) + bison_env["BISON_PKGDATADIR"] = bison_env["BISON_PKGDATADIR"].replace( + bison_runfiles_dir, + "external/{}".format(bison.owner.workspace_name), + ) + bison_env["M4"] = bison_env["M4"].replace( + bison_runfiles_dir, + "{}/external/{}".format(bison.root.path, bison.owner.workspace_name), + ) for key, value in bison_env.items(): bison_env[key] = value.replace(bison_runfiles_dir, actual)