From 5f7ac71048ed04e6f4f2a5ff04f0da8f0722635e Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Tue, 30 Apr 2019 11:19:08 -0700 Subject: Fix dependencies on auto-generated code The sensor/entity/fru/inventory auto-generated cpp code should depend on the mako template, the generator python, and the yaml that it is built with. This modifies the autoconf to export the yaml and the automake to set the dependencies. Tested-by: modify one of the dependencies and watch it get rebuilt Change-Id: Iaab9585c202baf4506e0b7e62aa42a3bf2828ae4 Signed-off-by: Vernon Mauery --- scripts/fru_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/fru_gen.py') diff --git a/scripts/fru_gen.py b/scripts/fru_gen.py index f6111b7..a8d148a 100755 --- a/scripts/fru_gen.py +++ b/scripts/fru_gen.py @@ -8,7 +8,7 @@ from mako.template import Template def generate_cpp(inventory_yaml, output_dir): - with open(os.path.join(script_dir, inventory_yaml), 'r') as f: + with open(inventory_yaml, 'r') as f: ifile = yaml.safe_load(f) if not isinstance(ifile, dict): ifile = {} @@ -48,7 +48,7 @@ def main(): args = parser.parse_args() - if (not (os.path.isfile(os.path.join(script_dir, args.inventory_yaml)))): + if (not (os.path.isfile(args.inventory_yaml))): sys.exit("Can not find input yaml file " + args.inventory_yaml) function = valid_commands[args.command] -- cgit v1.2.1