fix out-of-tree builds
PATCH 1/1 fix out-of-tree builds
From: Adrian Negreanu <[email protected]>
version.h is -include-ed assuming that builddir is the same as srcdir;
In file included from <command-line>:0:0:./../../tests/../lib/check-ndebug.h:3:1: fatal error:../../tests/../version.h: No such file or directory
#endif
^
--- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile.am +1 -1
@@ -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" \ -DIGT_DATADIR=\""$(abs_srcdir)"\" \ $(NULL)
Signature · 1 line
1.9.0
Quoted 5 lines · Adrian Negreanu
From: Adrian Negreanu <[email protected]>
version.his -include-ed assuming that builddir is the same as srcdir;
Quoted 7 lines
In file included from <command-line>:0:0:
./../../tests/../lib/check-ndebug.h:3:1: fatal error:../../tests/../version.h: No such file or directory
#endif
^Signed-off-by Adrian Negreanu <[email protected]>
Thanks for the patch, applied.
-Daniel
Quoted 24 lines
--- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/Makefile.am +1
-1@@ -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" \ -DIGT_DATADIR=\""$(abs_srcdir)"\" \ $(NULL)Signature · 6 lines
1.9.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 13 lines · Daniel Vetter
tests/Makefile.am AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ · line 27
Quoted 13 lines
tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/Makefile.am +1
-1@@ -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)
Signature · 1 line
Damien