waf: fixed the build with a space in the source directory
authorAndrew Tridgell <tridge@samba.org>
Sun, 21 Nov 2010 12:04:43 +0000 (23:04 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 21 Nov 2010 12:10:14 +0000 (23:10 +1100)
buildtools/scripts/abi_gen.sh
buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/samba_autoproto.py
buildtools/wafsamba/samba_pidl.py
buildtools/wafsamba/wafsamba.py

index 7b4cb1271306f2382d577d5881cbbdd283cb3be1..d563fb85333a74e54043329bde58864dedaf3e52 100755 (executable)
@@ -10,11 +10,11 @@ cat <<EOF
 set height 0
 set width 0
 EOF
-nm $SHAREDLIB | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | cut -c3- | sort | while read s; do
+nm "$SHAREDLIB" | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | cut -c3- | sort | while read s; do
     echo "echo $s: "
     echo p $s
 done
 ) > $GDBSCRIPT
 
-gdb -batch -x $GDBSCRIPT $SHAREDLIB < /dev/null
+gdb -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
 rm -f $GDBSCRIPT
index e84a456287748e5aaeb25fb9ee79f4e86549e51f..03031a7c78af777535f0e020f7c6cd45d9a8eeb4 100644 (file)
@@ -356,8 +356,10 @@ def CHECK_CODE(conf, code, define,
     if msg is None:
         msg="Checking for %s" % define
 
+    cflags = TO_LIST(cflags)
+
     if local_include:
-        cflags += ' -I%s' % conf.curdir
+        cflags.append('-I%s' % conf.curdir)
 
     if not link:
         type='nolink'
@@ -368,7 +370,6 @@ def CHECK_CODE(conf, code, define,
 
     (ccflags, ldflags) = library_flags(conf, uselib)
 
-    cflags = TO_LIST(cflags)
     cflags.extend(ccflags)
 
     if on_target:
index bb6400cf0587ded1cc006b600670be6765544560..2d8ea546ab2a594ddb69a8cf179dbb04c27321b6 100644 (file)
@@ -16,7 +16,7 @@ def SAMBA_AUTOPROTO(bld, header, source):
         on_results=True,
         ext_out='.c',
         before ='cc',
-        rule = '${PERL} ${SCRIPT}/mkproto.pl --srcdir=.. --builddir=. --public=/dev/null --private=${TGT} ${SRC}'
+        rule = '${PERL} "${SCRIPT}/mkproto.pl" --srcdir=.. --builddir=. --public=/dev/null --private="${TGT}" ${SRC}'
         )
     t.env.SCRIPT = os.path.join(bld.srcnode.abspath(), 'source4/script')
 Build.BuildContext.SAMBA_AUTOPROTO = SAMBA_AUTOPROTO
index 521222dc5cc34aa4e59a51397a7301b7ca40c4da..902d4c6e012acb1ebf9dcfd553b58fd4af94b621 100644 (file)
@@ -58,7 +58,7 @@ def SAMBA_PIDL(bld, pname, source,
         pidl_src_nodes = bld.pidl_files_cache
 
     # the cd .. is needed because pidl currently is sensitive to the directory it is run in
-    t = bld(rule='cd .. && ${PERL} ${PIDL} --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- ${SRC[0].abspath(env)}',
+    t = bld(rule='cd .. && ${PERL} "${PIDL}" --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- "${SRC[0].abspath(env)}"',
             ext_out    = '.c',
             before     = 'cc',
             on_results = True,
index dc25145de74c097cfe48a0991742ce7567639f77..5d13fa1023aad02e6b1b1eb5830fb859f147f32a 100644 (file)
@@ -566,7 +566,7 @@ def ENABLE_TIMESTAMP_DEPENDENCIES(conf):
 
 
 
-t = Task.simple_task_type('copy_script', 'rm -f ${LINK_TARGET} && ln -s ${SRC[0].abspath(env)} ${LINK_TARGET}',
+t = Task.simple_task_type('copy_script', 'rm -f "${LINK_TARGET}" && ln -s "${SRC[0].abspath(env)}" ${LINK_TARGET}',
                           shell=True, color='PINK', ext_in='.bin')
 t.quiet = True