From: Damien Lespiau Subject: Re: [PATCH] fix out-of-tree builds Date: Fri, 21 Mar 2014 15:02:25 +0000 Message-ID: <20140321150225.GE7294@strange.amr.corp.intel.com> References: <1395385575-17761-1-git-send-email-groleo@gmail.com> <20140321095544.GX30571@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AF666E374 for ; Fri, 21 Mar 2014 08:04:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140321095544.GX30571@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org, Adrian Negreanu List-Id: intel-gfx@lists.freedesktop.org On Fri, Mar 21, 2014 at 10:55:44AM +0100, Daniel Vetter wrote: > > tests/Makefile.am | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tests/Makefile.am b/tests/Makefile.am > > index aadcbc8..ddb0fd7 100644 > > --- a/tests/Makefile.am > > +++ b/tests/Makefile.am > > @@ -24,7 +24,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ > > -I$(srcdir)/.. \ > > -I$(srcdir)/../lib \ > > -include "$(srcdir)/../lib/check-ndebug.h" \ > > - -include "$(srcdir)/../version.h" \ > > + -include "$(builddir)/version.h" \ This did look fishy (going from $srcdir/.. to $builddir) and is not correct :) srcdir is the current source dir builddir is the current build dir both of those variable represent where the current directory is, in a recursive setup this means inside tests/. top_builddir/top_srcdir can be used to represent the topmost directory in each case. This should be either: - $(top_builddir)/version.h or - $(builddir)/../version.h It happens to work because it's evaluated to "-include "./version.h", and top_builddir is included by automake's default include search paths. DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -- Damien