提交 1b21d300 编写于 作者: E Eric Blake

build: fix xenconfig VPATH builds

Ever since commit 2c78051a split out a helper library for the sake of
changing CFLAGS, a VPATH build with xenconfig enabled has failed:

  CC       xenconfig/libvirt_xenxldiskparser_la-xen_xl_disk.lo
  ../../src/xenconfig/xen_xl_disk.l:37:21: fatal error: xen_xl.h: No such file or directory
   # include "xen_xl.h"
             ^
  compilation terminated.
  Makefile:9462: recipe for target 'xenconfig/libvirt_xenxldiskparser_la-xen_xl_disk.lo' failed

The solution is to tell the build to look for xen_xl.h relative
to $(srcdir), since we keep that file under version control.

[Not fixed here - the raw use of -Wno-unused-parameter in CFLAGS
is NOT portable; ideally, we should be doing a configure test
and only supplying that argument when we know the compiler supports
-Wunused-parameter; but that's a patch for another day]

[Not fixed here - there are still issues with parallel builds hitting
a race between generating the files and trying to compile/distribute
them]

* src/Makefile.am (libvirt_xenxldiskparser_la_CFLAGS): Add another
include directory.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 732586d9
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2014 Red Hat, Inc.
## Copyright (C) 2005-2015 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
......@@ -1074,6 +1074,7 @@ if WITH_XENCONFIG
# Add the generated object to its own library to control CFLAGS
noinst_LTLIBRARIES += libvirt_xenxldiskparser.la
libvirt_xenxldiskparser_la_CFLAGS = \
-I$(srcdir)/xenconfig \
-I$(top_srcdir)/src/conf $(AM_CFLAGS) -Wno-unused-parameter
libvirt_xenxldiskparser_la_SOURCES = \
$(XENXLDISKPARSER_SOURCES)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册