mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
docs: apibuild: Fix VPATH build
libvirt-common.h is generated into builddir/include/libvirt. apibuild.py only operated on srcdir/inlcude/libvirt. With VPATH build srcdir/docs/libvirt-libvirt-common.html would not get generated and make RPM failed.
This commit is contained in:
parent
856e84a516
commit
d195cffa2e
@ -325,7 +325,7 @@ $(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
|||||||
$(top_srcdir)/src/util/virerror.c \
|
$(top_srcdir)/src/util/virerror.c \
|
||||||
$(top_srcdir)/src/util/virevent.c \
|
$(top_srcdir)/src/util/virevent.c \
|
||||||
$(top_srcdir)/src/util/virtypedparam.c
|
$(top_srcdir)/src/util/virtypedparam.c
|
||||||
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
|
$(AM_V_GEN)srcdir=$(srcdir) builddir=$(abs_builddir) $(PYTHON) $(APIBUILD)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
|
@ -2584,13 +2584,18 @@ def rebuild(name):
|
|||||||
self.warning("rebuild() failed, unknown module %s") % name
|
self.warning("rebuild() failed, unknown module %s") % name
|
||||||
return None
|
return None
|
||||||
builder = None
|
builder = None
|
||||||
srcdir = os.environ["srcdir"]
|
srcdir = os.path.abspath((os.environ["srcdir"]))
|
||||||
|
builddir = os.path.abspath((os.environ["builddir"]))
|
||||||
|
if srcdir == builddir:
|
||||||
|
builddir = None
|
||||||
if glob.glob(srcdir + "/../src/libvirt.c") != [] :
|
if glob.glob(srcdir + "/../src/libvirt.c") != [] :
|
||||||
if not quiet:
|
if not quiet:
|
||||||
print "Rebuilding API description for %s" % name
|
print "Rebuilding API description for %s" % name
|
||||||
dirs = [srcdir + "/../src",
|
dirs = [srcdir + "/../src",
|
||||||
srcdir + "/../src/util",
|
srcdir + "/../src/util",
|
||||||
srcdir + "/../include/libvirt"]
|
srcdir + "/../include/libvirt"]
|
||||||
|
if builddir:
|
||||||
|
dirs.append(builddir + "/../include/libvirt")
|
||||||
if glob.glob(srcdir + "/../include/libvirt/libvirt.h") == [] :
|
if glob.glob(srcdir + "/../include/libvirt/libvirt.h") == [] :
|
||||||
dirs.append("../include/libvirt")
|
dirs.append("../include/libvirt")
|
||||||
builder = docBuilder(name, srcdir, dirs, [])
|
builder = docBuilder(name, srcdir, dirs, [])
|
||||||
|
Loading…
Reference in New Issue
Block a user