mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
meson: src: build libvirt_driver_esx.a static library
Drop automake like print from scripts/esx_vi_generator.py as well. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
7a25e43ab7
commit
1824c9968f
@ -1250,12 +1250,7 @@ def is_known_type(type):
|
||||
type in enums_by_name)
|
||||
|
||||
|
||||
def open_and_print(filename):
|
||||
if filename.startswith("./"):
|
||||
print(" GEN " + filename[2:])
|
||||
else:
|
||||
print(" GEN " + filename)
|
||||
|
||||
def open_file(filename):
|
||||
return open(filename, "wt")
|
||||
|
||||
|
||||
@ -1327,17 +1322,17 @@ input_filename = os.path.join(sys.argv[1], "esx/esx_vi_generator.input")
|
||||
output_dirname = os.path.join(sys.argv[2], "esx")
|
||||
|
||||
|
||||
types_typedef = open_and_print(os.path.join(output_dirname, "esx_vi_types.generated.typedef"))
|
||||
types_typeenum = open_and_print(os.path.join(output_dirname, "esx_vi_types.generated.typeenum"))
|
||||
types_typetostring = open_and_print(os.path.join(output_dirname, "esx_vi_types.generated.typetostring"))
|
||||
types_typefromstring = open_and_print(os.path.join(output_dirname, "esx_vi_types.generated.typefromstring"))
|
||||
types_header = open_and_print(os.path.join(output_dirname, "esx_vi_types.generated.h"))
|
||||
types_source = open_and_print(os.path.join(output_dirname, "esx_vi_types.generated.c"))
|
||||
methods_header = open_and_print(os.path.join(output_dirname, "esx_vi_methods.generated.h"))
|
||||
methods_source = open_and_print(os.path.join(output_dirname, "esx_vi_methods.generated.c"))
|
||||
methods_macro = open_and_print(os.path.join(output_dirname, "esx_vi_methods.generated.macro"))
|
||||
helpers_header = open_and_print(os.path.join(output_dirname, "esx_vi.generated.h"))
|
||||
helpers_source = open_and_print(os.path.join(output_dirname, "esx_vi.generated.c"))
|
||||
types_typedef = open_file(os.path.join(output_dirname, "esx_vi_types.generated.typedef"))
|
||||
types_typeenum = open_file(os.path.join(output_dirname, "esx_vi_types.generated.typeenum"))
|
||||
types_typetostring = open_file(os.path.join(output_dirname, "esx_vi_types.generated.typetostring"))
|
||||
types_typefromstring = open_file(os.path.join(output_dirname, "esx_vi_types.generated.typefromstring"))
|
||||
types_header = open_file(os.path.join(output_dirname, "esx_vi_types.generated.h"))
|
||||
types_source = open_file(os.path.join(output_dirname, "esx_vi_types.generated.c"))
|
||||
methods_header = open_file(os.path.join(output_dirname, "esx_vi_methods.generated.h"))
|
||||
methods_source = open_file(os.path.join(output_dirname, "esx_vi_methods.generated.c"))
|
||||
methods_macro = open_file(os.path.join(output_dirname, "esx_vi_methods.generated.macro"))
|
||||
helpers_header = open_file(os.path.join(output_dirname, "esx_vi.generated.h"))
|
||||
helpers_source = open_file(os.path.join(output_dirname, "esx_vi.generated.c"))
|
||||
|
||||
|
||||
number = 0
|
||||
|
@ -1,79 +1,7 @@
|
||||
# vim: filetype=automake
|
||||
|
||||
ESX_DRIVER_SOURCES = \
|
||||
esx/esx_private.h \
|
||||
esx/esx_driver.c \
|
||||
esx/esx_driver.h \
|
||||
esx/esx_interface_driver.c \
|
||||
esx/esx_interface_driver.h \
|
||||
esx/esx_network_driver.c \
|
||||
esx/esx_network_driver.h \
|
||||
esx/esx_storage_driver.c \
|
||||
esx/esx_storage_driver.h \
|
||||
esx/esx_storage_backend_vmfs.c \
|
||||
esx/esx_storage_backend_vmfs.h \
|
||||
esx/esx_storage_backend_iscsi.c \
|
||||
esx/esx_storage_backend_iscsi.h \
|
||||
esx/esx_stream.c \
|
||||
esx/esx_stream.h \
|
||||
esx/esx_util.c \
|
||||
esx/esx_util.h \
|
||||
esx/esx_vi.c \
|
||||
esx/esx_vi.h \
|
||||
esx/esx_vi_methods.c \
|
||||
esx/esx_vi_methods.h \
|
||||
esx/esx_vi_types.c \
|
||||
esx/esx_vi_types.h \
|
||||
$(NULL)
|
||||
|
||||
ESX_DRIVER_GENERATED = \
|
||||
esx/esx_vi_methods.generated.c \
|
||||
esx/esx_vi_methods.generated.h \
|
||||
esx/esx_vi_methods.generated.macro \
|
||||
esx/esx_vi_types.generated.c \
|
||||
esx/esx_vi_types.generated.h \
|
||||
esx/esx_vi_types.generated.typedef \
|
||||
esx/esx_vi_types.generated.typeenum \
|
||||
esx/esx_vi_types.generated.typetostring \
|
||||
esx/esx_vi_types.generated.typefromstring \
|
||||
esx/esx_vi.generated.c \
|
||||
esx/esx_vi.generated.h \
|
||||
$(NULL)
|
||||
|
||||
ESX_GENERATED_STAMP = .esx_vi_generator.stamp
|
||||
|
||||
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(ESX_DRIVER_SOURCES))
|
||||
|
||||
BUILT_SOURCES += $(ESX_DRIVER_GENERATED)
|
||||
|
||||
$(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP)
|
||||
|
||||
$(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \
|
||||
$(top_srcdir)/scripts/esx_vi_generator.py
|
||||
$(AM_V_GEN) $(RUNUTF8) $(PYTHON) \
|
||||
$(top_srcdir)/scripts/esx_vi_generator.py \
|
||||
$(srcdir) $(builddir) && touch $@
|
||||
|
||||
if WITH_ESX
|
||||
USED_SYM_FILES += $(srcdir)/libvirt_esx.syms
|
||||
else ! WITH_ESX
|
||||
SYM_FILES += $(srcdir)/libvirt_esx.syms
|
||||
endif ! WITH_ESX
|
||||
|
||||
|
||||
if WITH_ESX
|
||||
noinst_LTLIBRARIES += libvirt_driver_esx.la
|
||||
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)
|
||||
libvirt_driver_esx_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
libvirt_driver_esx_la_LIBADD = $(CURL_LIBS)
|
||||
libvirt_driver_esx_la_SOURCES = $(ESX_DRIVER_SOURCES)
|
||||
libvirt_driver_esx_la_DEPENDENCIES = $(ESX_DRIVER_GENERATED)
|
||||
|
||||
endif WITH_ESX
|
||||
|
56
src/esx/meson.build
Normal file
56
src/esx/meson.build
Normal file
@ -0,0 +1,56 @@
|
||||
esx_sources = [
|
||||
'esx_driver.c',
|
||||
'esx_interface_driver.c',
|
||||
'esx_network_driver.c',
|
||||
'esx_storage_driver.c',
|
||||
'esx_storage_backend_vmfs.c',
|
||||
'esx_storage_backend_iscsi.c',
|
||||
'esx_stream.c',
|
||||
'esx_util.c',
|
||||
'esx_vi.c',
|
||||
'esx_vi_methods.c',
|
||||
'esx_vi_types.c',
|
||||
]
|
||||
|
||||
esx_gen_sources = custom_target(
|
||||
'virtesxgen',
|
||||
input: [
|
||||
'esx_vi_generator.input',
|
||||
],
|
||||
output: [
|
||||
'esx_vi.generated.c',
|
||||
'esx_vi.generated.h',
|
||||
'esx_vi_methods.generated.c',
|
||||
'esx_vi_methods.generated.h',
|
||||
'esx_vi_methods.generated.macro',
|
||||
'esx_vi_types.generated.c',
|
||||
'esx_vi_types.generated.h',
|
||||
'esx_vi_types.generated.typedef',
|
||||
'esx_vi_types.generated.typeenum',
|
||||
'esx_vi_types.generated.typefromstring',
|
||||
'esx_vi_types.generated.typetostring',
|
||||
],
|
||||
command: [
|
||||
meson_python_prog, python3_prog.path(), esx_vi_generator_prog.path(),
|
||||
meson.source_root() / 'src',
|
||||
meson.build_root() / 'src',
|
||||
],
|
||||
)
|
||||
|
||||
if conf.has('WITH_ESX')
|
||||
esx_lib = static_library(
|
||||
'virt_driver_esx',
|
||||
[
|
||||
esx_sources,
|
||||
esx_gen_sources[1],
|
||||
],
|
||||
dependencies: [
|
||||
curl_dep,
|
||||
src_dep,
|
||||
],
|
||||
include_directories: [
|
||||
conf_inc_dir,
|
||||
vmx_inc_dir,
|
||||
],
|
||||
)
|
||||
endif
|
@ -96,4 +96,5 @@ subdir('vmx')
|
||||
|
||||
subdir('admin')
|
||||
|
||||
subdir('esx')
|
||||
subdir('vmware')
|
||||
|
Loading…
Reference in New Issue
Block a user