From patchwork Mon Aug 4 07:12:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 376141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DFB451400A3 for ; Mon, 4 Aug 2014 17:15:55 +1000 (EST) Received: from localhost ([::1]:50653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XECUs-0001g2-1C for incoming@patchwork.ozlabs.org; Mon, 04 Aug 2014 03:15:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XECUS-0001PQ-NC for qemu-devel@nongnu.org; Mon, 04 Aug 2014 03:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XECUM-0001sB-2p for qemu-devel@nongnu.org; Mon, 04 Aug 2014 03:15:28 -0400 Received: from [59.151.112.132] (port=19683 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XECUL-0001rS-MX for qemu-devel@nongnu.org; Mon, 04 Aug 2014 03:15:22 -0400 X-IronPort-AV: E=Sophos;i="5.04,260,1406563200"; d="scan'208";a="34136947" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 04 Aug 2014 15:12:25 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s747FCc7025520 for ; Mon, 4 Aug 2014 15:15:12 +0800 Received: from G08FNSTD100614.fnst.cn.fujitsu.com (10.167.226.102) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Mon, 4 Aug 2014 15:15:14 +0800 From: Hu Tao To: Date: Mon, 4 Aug 2014 15:12:55 +0800 Message-ID: <1407136375-19688-1-git-send-email-hutao@cn.fujitsu.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 X-Originating-IP: [10.167.226.102] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 Subject: [Qemu-devel] [PATCH] configure: replace \n with space in optarg X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When optarg happens to contain \n like: ../configure --target-list='i386-softmmu x86_64-softmmu' make will fail with message: config-host.mak:45: *** missing separator. Stop. This patch fix this problem by replacing \n with space in optarg. Signed-off-by: Hu Tao --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f7685b5..0ee9de1 100755 --- a/configure +++ b/configure @@ -338,7 +338,7 @@ numa="" # parse CC options first for opt do - optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` + optarg=`expr "x$opt" : 'x[^=]*=\(.*\)' | tr '\n' ' '` case "$opt" in --cross-prefix=*) cross_prefix="$optarg" ;; @@ -722,7 +722,7 @@ fi werror="" for opt do - optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` + optarg=`expr "x$opt" : 'x[^=]*=\(.*\)' | tr '\n' ' '` case "$opt" in --help|-h) show_help=yes ;;