src: esx: generate source files into build directory

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Pavel Hrdina 2019-10-16 14:45:15 +02:00
parent d6be9e7f65
commit 11a865b9f9
4 changed files with 10 additions and 10 deletions

1
.gitignore vendored
View File

@ -41,7 +41,6 @@ Makefile.in
# libvirt related ignores
/build/
/ci/scratch/
/src/esx/*.generated.*
/src/hyperv/*.generated.*
/src/locking/lock_daemon_dispatch_stubs.h
/src/logging/log_daemon_dispatch_stubs.h

View File

@ -63,8 +63,8 @@ $(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP)
$(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \
$(srcdir)/esx/esx_vi_generator.py
$(AM_V_GEN)srcdir=$(srcdir) $(RUNUTF8) $(PYTHON) \
$(srcdir)/esx/esx_vi_generator.py && touch $@
$(AM_V_GEN) $(RUNUTF8) $(PYTHON) \
$(srcdir)/esx/esx_vi_generator.py $(srcdir) $(builddir) && touch $@
MAINTAINERCLEANFILES += $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP)
@ -81,6 +81,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_esx.la
libvirt_driver_esx_la_CFLAGS = \
$(CURL_CFLAGS) \
-I$(srcdir)/conf \
-I$(builddir)/esx \
-I$(srcdir)/vmx \
$(AM_CFLAGS) \
$(NULL)

View File

@ -1379,14 +1379,11 @@ additional_object_features = {
removed_object_features = {}
if len(sys.argv) != 3:
report_error("usage: %s srcdir builddir" % sys.argv[0])
if "srcdir" in os.environ:
input_filename = os.path.join(os.environ["srcdir"], "esx/esx_vi_generator.input")
output_dirname = os.path.join(os.environ["srcdir"], "esx")
else:
input_filename = os.path.join(os.getcwd(), "esx_vi_generator.input")
output_dirname = os.getcwd()
input_filename = os.path.join(sys.argv[1], "esx/esx_vi_generator.input")
output_dirname = os.path.join(sys.argv[2], "esx")

View File

@ -756,6 +756,9 @@ esxutilstest_SOURCES = \
esxutilstest.c \
testutils.c testutils.h
esxutilstest_LDADD = $(LDADDS)
esxutilstest_CFLAGS = \
-I$(top_builddir)/src/esx \
$(AM_CFLAGS)
else ! WITH_ESX
EXTRA_DIST += esxutilstest.c
endif ! WITH_ESX