diff options
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rwxr-xr-x | scripts/entity_gen.py | 4 | ||||
-rwxr-xr-x | scripts/fru_gen.py | 4 | ||||
-rwxr-xr-x | scripts/inventory-sensor.py | 4 | ||||
-rwxr-xr-x | scripts/sensor_gen.py | 4 |
6 files changed, 20 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index 864eb93..e7a35a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,16 +70,16 @@ ipmid_LDFLAGS = \ ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF) $(SHELL) $^ > $@ -sensor-gen.cpp: +sensor-gen.cpp: scripts/writesensor.mako.cpp scripts/sensor_gen.py @SENSOR_YAML_GEN@ $(AM_V_GEN)@SENSORGEN@ -o $(top_builddir) generate-cpp -inventory-sensor-gen.cpp: +inventory-sensor-gen.cpp: scripts/inventorysensor.mako.cpp scripts/inventory-sensor.py @INVSENSOR_YAML_GEN@ $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp -fru-read-gen.cpp: +fru-read-gen.cpp: scripts/readfru.mako.cpp scripts/fru_gen.py @FRU_YAML_GEN@ $(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp -entity-gen.cpp: +entity-gen.cpp: scripts/writeentity.mako.cpp scripts/entity_gen.py @ENTITY_YAML_GEN@ $(AM_V_GEN)@ENTITYGEN@ -o $(top_builddir) generate-cpp providers_LTLIBRARIES += libipmi20.la diff --git a/configure.ac b/configure.ac index 2bb011f..8020fbd 100644 --- a/configure.ac +++ b/configure.ac @@ -103,20 +103,24 @@ if test -z "$WHITELIST_CONF"; then WHITELIST_CONF=${srcdir}/host-ipmid-whitelist.conf fi -AS_IF([test "x$SENSOR_YAML_GEN" == "x"], [SENSOR_YAML_GEN="sensor-example.yaml"]) +AS_IF([test "x$SENSOR_YAML_GEN" == "x"], [SENSOR_YAML_GEN="scripts/sensor-example.yaml"]) SENSORGEN="$PYTHON ${srcdir}/scripts/sensor_gen.py -i $SENSOR_YAML_GEN" +AC_SUBST(SENSOR_YAML_GEN) AC_SUBST(SENSORGEN) -AS_IF([test "x$INVSENSOR_YAML_GEN" == "x"], [INVSENSOR_YAML_GEN="inventory-sensor-example.yaml"]) +AS_IF([test "x$INVSENSOR_YAML_GEN" == "x"], [INVSENSOR_YAML_GEN="scripts/inventory-sensor-example.yaml"]) INVSENSORGEN="$PYTHON ${srcdir}/scripts/inventory-sensor.py -i $INVSENSOR_YAML_GEN" +AC_SUBST(INVSENSOR_YAML_GEN) AC_SUBST(INVSENSORGEN) -AS_IF([test "x$FRU_YAML_GEN" == "x"], [FRU_YAML_GEN="fru-read-example.yaml"]) +AS_IF([test "x$FRU_YAML_GEN" == "x"], [FRU_YAML_GEN="scripts/fru-read-example.yaml"]) FRUGEN="$PYTHON $srcdir/scripts/fru_gen.py -i $FRU_YAML_GEN" +AC_SUBST(FRU_YAML_GEN) AC_SUBST(FRUGEN) -AS_IF([test "x$ENTITY_YAML_GEN" == "x"], [ENTITY_YAML_GEN="entity-example.yaml"]) +AS_IF([test "x$ENTITY_YAML_GEN" == "x"], [ENTITY_YAML_GEN="scripts/entity-example.yaml"]) ENTITYGEN="$PYTHON $srcdir/scripts/entity_gen.py -i $ENTITY_YAML_GEN" +AC_SUBST(ENTITY_YAML_GEN) AC_SUBST(ENTITYGEN) AC_DEFINE(CALLOUT_FWD_ASSOCIATION, "callout", [The name of the callout's forward association.]) 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] 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] diff --git a/scripts/inventory-sensor.py b/scripts/inventory-sensor.py index 77222f5..2dd1e8d 100755 --- a/scripts/inventory-sensor.py +++ b/scripts/inventory-sensor.py @@ -8,7 +8,7 @@ from mako.template import Template def generate_cpp(sensor_yaml, output_dir): - with open(os.path.join(script_dir, sensor_yaml), 'r') as f: + with open(sensor_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.sensor_yaml)))): + if (not (os.path.isfile(args.sensor_yaml))): sys.exit("Can not find input yaml file " + args.sensor_yaml) function = valid_commands[args.command] diff --git a/scripts/sensor_gen.py b/scripts/sensor_gen.py index 822a00a..6f59021 100755 --- a/scripts/sensor_gen.py +++ b/scripts/sensor_gen.py @@ -8,7 +8,7 @@ from mako.template import Template def generate_cpp(sensor_yaml, output_dir): - with open(os.path.join(script_dir, sensor_yaml), 'r') as f: + with open(sensor_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.sensor_yaml)))): + if (not (os.path.isfile(args.sensor_yaml))): sys.exit("Can not find input yaml file " + args.sensor_yaml) function = valid_commands[args.command] |