From patchwork Tue Oct 12 23:47:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: PR binutils/12110 spaces in source path Date: Tue, 12 Oct 2010 13:47:14 -0000 From: Alan Modra X-Patchwork-Id: 67632 Message-Id: <20101012234714.GX26553@bubble.grove.modra.org> To: gcc-patches@gcc.gnu.org, binutils@sourceware.org Patch does as per the ChangeLog. A fix to actually support spaces in $srcdir is a bit more work. I started down that path, fixing all the shell expansions, but then hit the problem of VPATH and $srcdir in make targets/dependencies. Apparently it is possible to escape spaces with a backslash for make, but I'm not motivated enough to do that.. Fiddling with AS_MESSAGE_LOG_FD below is necessary because AC_MSG_ERROR at this point in configure.ac would normally echo to config.log, but we're using m4_divert_text to put the test before the first real use of $srcdir, before config.log output is opened. OK to install? Tested with gcc and binutils configure. PR binutils/12110 * configure.ac: Error when source path contains spaces. * configure: Regenerate. Index: configure.ac =================================================================== RCS file: /cvs/src/src/configure.ac,v retrieving revision 1.109 diff -u -p -r1.109 configure.ac --- configure.ac 7 Oct 2010 20:50:01 -0000 1.109 +++ configure.ac 12 Oct 2010 08:04:55 -0000 @@ -221,7 +221,14 @@ target_configdirs=`echo ${target_librari build_configdirs=`echo ${build_libs} ${build_tools}` m4_divert_text([PARSE_ARGS], -[ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'` +[case $srcdir in + *" "*) +m4_pushdef([AS_MESSAGE_LOG_FD], [])dnl + AC_MSG_ERROR([path to source, $srcdir, contains spaces]) +_m4_popdef([AS_MESSAGE_LOG_FD])dnl + ;; +esac +ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'` ]) ################################################################################