mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
meson: src: build dtrace files
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
e5aca34f01
commit
c83b567ca0
@ -405,27 +405,9 @@ libvirt_la_BUILT_LIBADD += libvirt_probes.lo
|
|||||||
libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o
|
libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o
|
||||||
nodist_libvirt_la_SOURCES = libvirt_probes.h
|
nodist_libvirt_la_SOURCES = libvirt_probes.h
|
||||||
|
|
||||||
BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp
|
BUILT_SOURCES += libvirt_functions.stp
|
||||||
|
|
||||||
|
tapset_DATA += libvirt_functions.stp
|
||||||
tapsetdir = $(datadir)/systemtap/tapset
|
|
||||||
tapset_DATA += libvirt_probes.stp libvirt_functions.stp
|
|
||||||
|
|
||||||
%_probes.h: %_probes.d
|
|
||||||
$(AM_V_GEN)$(DTRACE) -o $@ -h -s $<
|
|
||||||
|
|
||||||
.PRECIOUS: %_probes.o
|
|
||||||
%_probes.o: %_probes.d
|
|
||||||
$(AM_V_GEN)$(DTRACE) -o $@ -G -s $<
|
|
||||||
|
|
||||||
%_probes.lo: %_probes.o
|
|
||||||
$(AM_V_GEN)printf %s\\n \
|
|
||||||
'# $@ - a libtool object file' \
|
|
||||||
'# Generated by libtool (GNU libtool) 2.4' \
|
|
||||||
'# Actually generated by Makefile.am, in order to shut up libtool' \
|
|
||||||
"pic_object='$<'" \
|
|
||||||
"non_pic_object='$<'" \
|
|
||||||
> $@
|
|
||||||
|
|
||||||
# Keep this list synced with PROTOCOL_STRUCTS
|
# Keep this list synced with PROTOCOL_STRUCTS
|
||||||
RPC_PROBE_FILES += $(srcdir)/rpc/virnetprotocol.x \
|
RPC_PROBE_FILES += $(srcdir)/rpc/virnetprotocol.x \
|
||||||
@ -439,11 +421,6 @@ libvirt_functions.stp: $(RPC_PROBE_FILES) $(top_srcdir)/scripts/gensystemtap.py
|
|||||||
$(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/gensystemtap.py \
|
$(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/gensystemtap.py \
|
||||||
$(RPC_PROBE_FILES) > $@
|
$(RPC_PROBE_FILES) > $@
|
||||||
|
|
||||||
%_probes.stp: %_probes.d $(top_srcdir)/scripts/dtrace2systemtap.py \
|
|
||||||
$(top_builddir)/config.status
|
|
||||||
$(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/dtrace2systemtap.py \
|
|
||||||
$(bindir) $(sbindir) $(libdir) $< > $@
|
|
||||||
|
|
||||||
endif WITH_DTRACE_PROBES
|
endif WITH_DTRACE_PROBES
|
||||||
|
|
||||||
libvirt_qemu_la_SOURCES = libvirt-qemu.c
|
libvirt_qemu_la_SOURCES = libvirt-qemu.c
|
||||||
|
@ -34,3 +34,45 @@ endif
|
|||||||
if conf.has('WITH_SECDRIVER_APPARMOR')
|
if conf.has('WITH_SECDRIVER_APPARMOR')
|
||||||
secdriver_dep += apparmor_dep
|
secdriver_dep += apparmor_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# generate systemtap files
|
||||||
|
|
||||||
|
systemtap_dir = datadir / 'systemtap' / 'tapset'
|
||||||
|
|
||||||
|
dtrace_gen_headers = []
|
||||||
|
dtrace_gen_objects = []
|
||||||
|
|
||||||
|
if conf.has('WITH_DTRACE_PROBES')
|
||||||
|
infile = 'libvirt_probes.d'
|
||||||
|
out_h = 'libvirt_probes.h'
|
||||||
|
out_o = 'libvirt_probes.o'
|
||||||
|
out_stp = 'libvirt_probes.stp'
|
||||||
|
|
||||||
|
dtrace_gen_headers += custom_target(
|
||||||
|
out_h,
|
||||||
|
input: infile,
|
||||||
|
output: out_h,
|
||||||
|
command: [ dtrace_prog, '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ],
|
||||||
|
)
|
||||||
|
|
||||||
|
dtrace_gen_objects += custom_target(
|
||||||
|
out_o,
|
||||||
|
input: infile,
|
||||||
|
output: out_o,
|
||||||
|
command: [ dtrace_prog, '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ],
|
||||||
|
)
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
out_stp,
|
||||||
|
input: infile,
|
||||||
|
output: out_stp,
|
||||||
|
command: [
|
||||||
|
meson_python_prog, python3_prog.path(), dtrace2systemtap_prog.path(),
|
||||||
|
bindir, sbindir, libdir, '@INPUT@'
|
||||||
|
],
|
||||||
|
capture: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: systemtap_dir,
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user