scons: Update for xmlpool/options.h generation.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 12 Jan 2013 18:58:31 +0000 (10:58 -0800)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 12 Jan 2013 19:00:04 +0000 (19:00 +0000)
src/gallium/state_trackers/dri/drm/SConscript
src/gallium/state_trackers/dri/sw/SConscript
src/gallium/targets/SConscript.dri
src/mesa/drivers/SConscript
src/mesa/drivers/dri/common/xmlpool/SConscript [new file with mode: 0644]

index c63918a0e187ed60a90f8d6b8c16a84366043dcf..a996f50bf2d4e54669df3845bdaedb9ac925e5c1 100644 (file)
@@ -12,6 +12,7 @@ env.Append(CPPPATH = [
     '#/src/mesa',
     '#/src/gallium/state_trackers/dri/common',
     '#/src/mesa/drivers/dri/common',
+    xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
 ])
 
 sources = [
index d0c3efc6faa39d613578abf146c24e07443dcc9c..287733eea62ad4e3583e282663bf764ca675616c 100644 (file)
@@ -10,6 +10,7 @@ env.Append(CPPPATH = [
     '#/src/mesa',
     '#/src/gallium/state_trackers/dri/common',
     '#/src/mesa/drivers/dri/common',
+    xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
 ])
 
 env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
index 7032373a6abb6aa69efa565e7c46e0dea20c9a41..04c8ec789f83b762b2c93bf469785b0f5f0d780f 100644 (file)
@@ -10,6 +10,7 @@ drienv = env.Clone()
 
 drienv.Replace(CPPPATH = [
     '#src/mesa/drivers/dri/common',
+    xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
     '#include',
     '#include/GL/internal',
     '#src/mapi',
index f1c4da6b86c9e471fbf6c9da9551b6546e824c96..6dcc50655016439e6cbe27724d340c15511a1adb 100644 (file)
@@ -5,5 +5,8 @@ SConscript('osmesa/SConscript')
 if env['x11']:
     SConscript('x11/SConscript')
 
+if env['drm']:
+    SConscript('dri/common/xmlpool/SConscript')
+
 if env['platform'] == 'windows':
     SConscript('windows/gdi/SConscript')
diff --git a/src/mesa/drivers/dri/common/xmlpool/SConscript b/src/mesa/drivers/dri/common/xmlpool/SConscript
new file mode 100644 (file)
index 0000000..fa42554
--- /dev/null
@@ -0,0 +1,14 @@
+Import('*')
+
+from sys import executable as python_cmd
+
+LOCALEDIR = env.Dir('.').srcnode().abspath
+
+xmlpool_options, = env.CodeGenerate(
+    target = 'options.h',
+    script = 'gen_xmlpool.py',
+    source = ['t_options.h'],
+    command = python_cmd + ' $SCRIPT $SOURCE ' + LOCALEDIR + ' > $TARGET'
+)
+
+Export('xmlpool_options')