[libvirt] [PATCH] src: Include $(builddir)/util in the header search path

Andrea Bolognani abologna at redhat.com
Thu Oct 8 16:55:23 UTC 2015


Since a9fe620372144db, we are generating virkeymaps.h at build
time; however, we are not including $(builddir)/util in the
header search path, so when doing a VPATH build the compiler
is unable to locate the file.

make[2]: Entering directory
`/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src'
  GEN      util/virkeymaps.h
  ...
  CC       util/libvirt_util_la-virkeycode.lo
  CC       util/libvirt_util_la-virkeyfile.lo
  CC       util/libvirt_util_la-virlockspace.lo
  CC       util/libvirt_util_la-virlog.lo
../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory
 #include "virkeymaps.h"
                        ^
compilation terminated.
---
Tested by

  * running 'git clean -xdf' in the source directory
  * running './autogen.sh'
  * running 'make distclean'
  * making sure src/util/virkeymaps.h did not exist
  * moving to an empty build directory
  * running '../libvirt/configure'
  * running 'make check'
  * running 'make distcheck'

This is another take on the problem Michal's trying to solve with

  https://www.redhat.com/archives/libvir-list/2015-October/msg00254.html

The commit message is "inspired" by his ;)

 src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index e4660eb..01e816a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,7 @@ INCLUDES =	-I../gnulib/lib					\
 		-I../include					\
 		-I$(top_srcdir)/include				\
 		-I$(srcdir)/util				\
+		-I$(builddir)/util				\
 		-DIN_LIBVIRT					\
 		-Dabs_topbuilddir="\"$(abs_topbuilddir)\""	\
 		-Dabs_topsrcdir="\"$(abs_topsrcdir)\""		\
-- 
2.4.3




More information about the libvir-list mailing list