diff options
author | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-04-30 11:19:08 -0700 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-05-14 15:53:25 +0000 |
commit | 5f7ac71048ed04e6f4f2a5ff04f0da8f0722635e (patch) | |
tree | 6c0a33fd06bc272fd6069b58f196d036c33ed38f /scripts/entity_gen.py | |
parent | 4a8a4eb94df302fdf5cd9854922469185d9e0806 (diff) | |
download | phosphor-host-ipmid-5f7ac71048ed04e6f4f2a5ff04f0da8f0722635e.tar.gz phosphor-host-ipmid-5f7ac71048ed04e6f4f2a5ff04f0da8f0722635e.zip |
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 <vernon.mauery@linux.intel.com>
Diffstat (limited to 'scripts/entity_gen.py')
-rwxr-xr-x | scripts/entity_gen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/entity_gen.py b/scripts/entity_gen.py index 057821b..b558a44 100755 --- a/scripts/entity_gen.py +++ b/scripts/entity_gen.py @@ -8,7 +8,7 @@ from mako.template import Template def generate_cpp(entity_yaml, output_dir): - with open(os.path.join(script_dir, entity_yaml), 'r') as f: + with open(entity_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.entity_yaml)))): + if (not (os.path.isfile(args.entity_yaml))): sys.exit("Can not find input yaml file " + args.entity_yaml) function = valid_commands[args.command] |