From: Ian Campbell Subject: Re: [PATCH 0/3] move libxc and xenstore public headers to include subdir Date: Fri, 11 Jul 2014 09:53:44 +0100 Message-ID: <1405068824.4613.9.camel@hastur.hellion.org.uk> References: <21438.49434.359566.467942@mariner.uk.xensource.com> <1405010647.7406.5.camel@kazak.uk.xensource.com> <21438.50116.142993.634405@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21438.50116.142993.634405@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xensource.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 2014-07-10 at 17:48 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH 0/3] move libxc and xenstore public headers to include subdir"): > > On Thu, 2014-07-10 at 17:36 +0100, Ian Jackson wrote: > > > It seems to me that, instead, these headers are (or should be) put > > > into dist/install/, > > > > Definitely not. dist/install is an output directory which only some of > > our build runes create (basically those which are a shortcut for make > > install DESTDIR=dist) > > Yes, that's what I meant. I was using it as a shorthand for the > relevant part of DESTDIR. DESTDIR is not set at build time, only at make install time. Its sole purpose is to install things into it as a pseudo root dirctory for the users staging/packaging purposes. It should definitely not be used as part of our own build system. > > My build scripts for example don't use those rules, instead they do > > make -C tools build > > dir=$(mktemp -d /tmp/XXXXXX) > > make tools-install DESTDIR=${dir} > > > > Lots of distro packaging will do the same. > > Well, then the out-of-tree things should be getting things from there. Properly out-of-tree things should be getting them from their actal install locations (/usr/local/include or /usr/include etc), just like they get every other library header they depend on (modulo things like pkg-config etc). > > > and anything out-of-tree which needs them should > > > be looking for them there. > > > > Properly out of tree things should get them from /usr/{local/,}include > > which is where they are installed. > > > > This patch is about in-tree things and pseudo-in-tree things like > > tools/qemu-xen-dir. They are using -Itools/xenstore and picking up > > xenstore's internal headers alongside the public headers. > > I agree that this is wrong. But IMO it should be fixed by having > those things that can't cope (which should be only pseudo-in-tree > things as you put it) -I$(DESTDIR)/include (or whatever the real thing > is). No, $(DESTDIR) must not be used in this way by anything built by Xen's build targets. Specifically qemu-xen-dir's build cannot and should not use $(DESTDIR). If our build process for the qemu integration into the Xen process was to tell users: make build make install [DESTDIR=foo] Now you have Xen. Go and build qemu yourself with: clone qemu cd qemu configure it [using DESTDIR if you want] make then you would be right. But the last four steps here are integrated into our "make build" and cannot use DESTDIR. Ian.