[Mesa-dev] [PATCH] XXXgallium/common_dri: fix the scons build

Emil Velikov emil.l.velikov at gmail.com
Fri Sep 27 13:55:52 PDT 2013


* clone the drienv to driswenv and adjust approapriately
* export driswenv and use it in dri-swrast
* ensure __NOT_HAVE_DRM_H is defined for drisw, similar
to all other common_drisw users

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---

With this patch building dri-swrast, dri-i915 and dri-vmware
build correctly. Not a scons expect here, so there may be a
better way to do this.

Eric
With combining both dri_util and drisw_util, now swrast
driver(s) can query options from drirc, thus having an
extra dependency on expat. Is that intentional, or did
you fell that adding a dozen of #if DRI_BACKEND was a bit
of an overkill, same as me? 

Cheers
Emil

 src/gallium/targets/SConscript.dri        | 13 ++++++++++++-
 src/gallium/targets/dri-swrast/SConscript |  2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/gallium/targets/SConscript.dri b/src/gallium/targets/SConscript.dri
index 3485d4c..c5aab7c 100644
--- a/src/gallium/targets/SConscript.dri
+++ b/src/gallium/targets/SConscript.dri
@@ -30,6 +30,12 @@ drienv.Replace(CPPPATH = [
     '#src/egl/drivers/dri',
 ])
 
+driswenv = drienv.Clone()
+driswenv.Append(CPPDEFINES = [
+    '__NOT_HAVE_DRM_H',
+    'SWRAST_NO_DRM',
+])
+
 drienv.PkgUseModules('DRM')
 
 dri_common_utils = drienv.SharedObject(
@@ -47,7 +53,7 @@ dri_common_dri_util = drienv.SharedObject(
     source = '#src/mesa/drivers/dri/common/dri_util.c'
 )
 
-dri_common_drisw_util = drienv.SharedObject(
+dri_common_drisw_util = driswenv.SharedObject(
     target = 'drisw_util.o',
     source = '#src/mesa/drivers/dri/common/dri_util.c'
 )
@@ -69,8 +75,13 @@ drienv.AppendUnique(LIBS = [
     'expat',
 ])
 
+driswenv.AppendUnique(LIBS = [
+    'expat',
+])
+
 Export([
     'drienv',
+    'driswenv',
     'COMMON_DRI_SW_OBJECTS',
     'COMMON_DRI_DRM_OBJECTS',
 ])
diff --git a/src/gallium/targets/dri-swrast/SConscript b/src/gallium/targets/dri-swrast/SConscript
index 6b64c56..8ddd14e 100644
--- a/src/gallium/targets/dri-swrast/SConscript
+++ b/src/gallium/targets/dri-swrast/SConscript
@@ -1,6 +1,6 @@
 Import('*')
 
-env = drienv.Clone()
+env = driswenv.Clone()
 
 env.Append(CPPPATH = [
     '#/src/gallium/winsys/sw/dri',
-- 
1.8.4



More information about the mesa-dev mailing list