From patchwork Tue Oct 12 23:47:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 67632 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F36B2B70A6 for ; Wed, 13 Oct 2010 10:47:35 +1100 (EST) Received: (qmail 14379 invoked by alias); 12 Oct 2010 23:47:28 -0000 Received: (qmail 14362 invoked by uid 22791); 12 Oct 2010 23:47:28 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Oct 2010 23:47:23 +0000 Received: by iwn2 with SMTP id 2so1813834iwn.20 for ; Tue, 12 Oct 2010 16:47:21 -0700 (PDT) Received: by 10.42.214.10 with SMTP id gy10mr3892398icb.370.1286927241561; Tue, 12 Oct 2010 16:47:21 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id 8sm1777731iba.16.2010.10.12.16.47.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Oct 2010 16:47:20 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id C3256170C206; Wed, 13 Oct 2010 10:17:14 +1030 (CST) Date: Wed, 13 Oct 2010 10:17:14 +1030 From: Alan Modra To: gcc-patches@gcc.gnu.org, binutils@sourceware.org Subject: PR binutils/12110 spaces in source path Message-ID: <20101012234714.GX26553@bubble.grove.modra.org> Mail-Followup-To: gcc-patches@gcc.gnu.org, binutils@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.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'` ]) ################################################################################