提交 29b4dda5 编写于 作者: P Pavel Hrdina

src: hyperv: generate source files into build directory

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 11a865b9
......@@ -41,7 +41,6 @@ Makefile.in
# libvirt related ignores
/build/
/ci/scratch/
/src/hyperv/*.generated.*
/src/locking/lock_daemon_dispatch_stubs.h
/src/logging/log_daemon_dispatch_stubs.h
/src/lxc/lxc_controller_dispatch.h
......
......@@ -41,8 +41,8 @@ $(HYPERV_DRIVER_GENERATED): $(HYPERV_GENERATED_STAMP)
$(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \
$(srcdir)/hyperv/hyperv_wmi_generator.py
$(AM_V_GEN)srcdir=$(srcdir) $(RUNUTF8) $(PYTHON) \
$(srcdir)/hyperv/hyperv_wmi_generator.py \
$(AM_V_GEN) $(RUNUTF8) $(PYTHON) \
$(srcdir)/hyperv/hyperv_wmi_generator.py $(srcdir) $(builddir) \
&& touch $@
MAINTAINERCLEANFILES += $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_STAMP)
......@@ -53,6 +53,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_hyperv.la
libvirt_driver_hyperv_la_CFLAGS = \
$(OPENWSMAN_CFLAGS) \
-I$(srcdir)/conf \
-I$(builddir)/hyperv \
$(AM_CFLAGS) \
$(NULL)
libvirt_driver_hyperv_la_LDFLAGS = $(AM_LDFLAGS)
......
......@@ -454,12 +454,11 @@ def parse_class(block):
def main():
if "srcdir" in os.environ:
input_filename = os.path.join(os.environ["srcdir"], "hyperv/hyperv_wmi_generator.input")
output_dirname = os.path.join(os.environ["srcdir"], "hyperv")
else:
input_filename = os.path.join(os.getcwd(), "hyperv_wmi_generator.input")
output_dirname = os.getcwd()
if len(sys.argv) != 3:
report_error("usage: %s srcdir builddir" % sys.argv[0])
input_filename = os.path.join(sys.argv[1], "hyperv", "hyperv_wmi_generator.input")
output_dirname = os.path.join(sys.argv[2], "hyperv")
classes_typedef = open_and_print(os.path.join(output_dirname, "hyperv_wmi_classes.generated.typedef"))
classes_header = open_and_print(os.path.join(output_dirname, "hyperv_wmi_classes.generated.h"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册