From c7ef1a559032af82b9150c9f4b8f6e239a50e015 Mon Sep 17 00:00:00 2001 From: nobled Date: Thu, 15 Jul 2010 19:39:33 +0000 Subject: [PATCH] scons: wrap abspath to executables in quotes Fixes: "slang build fails if absolute path contains spaces" http://bugs.freedesktop.org/28894 (introduced in 3371f7e5025e5288eaba78973a2c81ec5d5b1e4d) --- src/mesa/SConscript | 2 +- src/mesa/slang/library/SConscript | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mesa/SConscript b/src/mesa/SConscript index 62e96ad..9908e64 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -322,7 +322,7 @@ if env['platform'] != 'winddk': matypes = env.Command( 'matypes.h', gen_matypes, - gen_matypes[0].abspath + ' > $TARGET', + '"%s" > $TARGET' % gen_matypes[0].abspath, ) # Add the dir containing the generated header (somewhere inside the # build dir) to the include path diff --git a/src/mesa/slang/library/SConscript b/src/mesa/slang/library/SConscript index 5112cef..73c7237 100644 --- a/src/mesa/slang/library/SConscript +++ b/src/mesa/slang/library/SConscript @@ -12,19 +12,25 @@ def glsl_compile_emitter(target, source, env): return (target, source) bld_frag = Builder( - action = Action(glsl_compile[0].abspath + ' fragment $SOURCE $TARGET', '$CODEGENCODESTR'), + action = Action( + '"%s" fragment $SOURCE $TARGET' % glsl_compile[0].abspath, + '$CODEGENCODESTR'), emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') bld_vert = Builder( - action = Action(glsl_compile[0].abspath + ' vertex $SOURCE $TARGET', '$CODEGENCODESTR'), + action = Action( + '"%s" vertex $SOURCE $TARGET' % glsl_compile[0].abspath, + '$CODEGENCODESTR'), emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') bld_geom = Builder( - action = Action(glsl_compile[0].abspath + ' geometry $SOURCE $TARGET', '$CODEGENCODESTR'), + action = Action( + '"%s" geometry $SOURCE $TARGET' % glsl_compile[0].abspath, + '$CODEGENCODESTR'), emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') -- 1.5.4.3