提交 55d76a72 编写于 作者: E Eric Blake

build: fix 'make dist' without dtrace

probes.h can only be generated on Linux, and then only with dtrace
installed.  If it is part of the tarball, then either 'make dist'
will fail if you don't have that setup, or we would have to start
keeping probes.h in libvirt.git.  Since we only need it to be
generated when dtrace is in use, it's better to avoid shipping
it in the first place, and avoid tracking it in git.

Meanwhile, there is a build dependency - since the RPC code is
generated, it can be built early; but when dtrace is enabled, we
must ensure probes.h is built even earlier.  Commit 1afcfbdd tried
to fix this, but did so in a way that added probes.h into the
tarball, and broke VPATH as well.  Commit ecbca767 fixed VPATH,
but didn't fix the more fundamental problem.  This patch solves
the issue by adding a dependency instead.

Tested with 'make dist' in a clean VPATH builds, for both
'./configure --without-dtrace' and './configure --with-dtrace';
all configurations were able to correctly build a tarball, and
the dtrace configuration no longer sticks probes.h in the tarball.

* src/Makefile.am (REMOTE_DRIVER_GENERATED): Don't ship probes.h;
rather, make it a dependency.
上级 ac6b368d
......@@ -202,11 +202,6 @@ REMOTE_DRIVER_GENERATED = \
$(srcdir)/remote/qemu_protocol.h \
$(srcdir)/remote/qemu_client_bodies.h
# The remote RPC driver needs probes.h
if WITH_DTRACE
REMOTE_DRIVER_GENERATED += probes.h
endif
REMOTE_PROTOCOL = $(srcdir)/remote/remote_protocol.x
QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x
REMOTE_DRIVER_PROTOCOL = $(REMOTE_PROTOCOL) $(QEMU_PROTOCOL)
......@@ -646,7 +641,6 @@ libvirt_driver_remote_la_LDFLAGS += -module -avoid-version
endif
libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES)
$(srcdir)/remote/remote_driver.c: $(REMOTE_DRIVER_GENERATED)
endif WITH_REMOTE
......@@ -1283,6 +1277,9 @@ if WITH_DTRACE
libvirt_la_BUILT_LIBADD += probes.o
libvirt_la_DEPENDENCIES += probes.o
nodist_libvirt_la_SOURCES = probes.h
if WITH_REMOTE
$(REMOTE_DRIVER_GENERATED): probes.h
endif WITH_REMOTE
BUILT_SOURCES += probes.h libvirt_probes.stp libvirt_functions.stp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册