This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR binutils/12110 spaces in source path
- From: Alan Modra <amodra at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, binutils at sourceware dot org
- Date: Wed, 13 Oct 2010 10:17:14 +1030
- Subject: PR binutils/12110 spaces in source path
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'`
])
################################################################################
--
Alan Modra
Australia Development Lab, IBM