From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.lisp.guile.bugs Subject: Re: GUILE_CFLAGS contains warning options Date: Sun, 27 Feb 2011 22:59:52 +0100 Message-ID: <201102272259.54333.bruno@clisp.org> References: <201102191507.50333.bruno@clisp.org> <201102231128.54229.bruno@clisp.org> <871v2tct9r.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298844037 30198 80.91.229.12 (27 Feb 2011 22:00:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 Feb 2011 22:00:37 +0000 (UTC) Cc: bug-guile@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Feb 27 23:00:33 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PtofH-0003v5-HP for guile-bugs@m.gmane.org; Sun, 27 Feb 2011 23:00:31 +0100 Original-Received: from localhost ([127.0.0.1]:33008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtofG-0004K9-NY for guile-bugs@m.gmane.org; Sun, 27 Feb 2011 17:00:30 -0500 Original-Received: from [140.186.70.92] (port=58589 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ptoew-0004Fw-9C for bug-guile@gnu.org; Sun, 27 Feb 2011 17:00:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ptoeu-0005Xr-H0 for bug-guile@gnu.org; Sun, 27 Feb 2011 17:00:09 -0500 Original-Received: from mo-p00-ob.rzone.de ([81.169.146.162]:20457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ptoel-0005PB-OP; Sun, 27 Feb 2011 17:00:00 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1298843996; l=1069; s=domk; d=haible.de; h=Content-Transfer-Encoding:Content-Type:MIME-Version:In-Reply-To: References:Cc:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=KQCu+nmVXrDsW2juVov/R8a0c2Y=; b=jUajx8+u1+nRHHnmqxRzB9Syd3Xt6TrAmnTFvuPUDjZlP2tJM7F9vnFJ4OAYMZGY46K P7N6GiqNgq/D7opcGhcGRF6PycJI6YpAC80S+FMH4x09lJl0jfRJifCBMxqjLZA7QViUO RqE5iDjbREp/oBc2xkJDMTj5767q43fspNM= X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brksyK8dozXDwHXjf9hj/zDJRaPAl/HgmxFw= X-RZG-CLASS-ID: mo00 Original-Received: from linuix.haible.de (dslb-088-069-163-162.pools.arcor-ip.net [88.69.163.162]) by post.strato.de (cohen mo61) (RZmta 25.5) with ESMTPA id o0671bn1RJ9jgQ ; Sun, 27 Feb 2011 22:59:55 +0100 (MET) User-Agent: KMail/1.9.9 In-Reply-To: <871v2tct9r.fsf@gnu.org> Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 81.169.146.162 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5241 Archived-At: Hello Ludo', > I=E2=80=99ll commit the patch below: Thanks; this is what I was aiming at. But the patch contains two small mistakes: 1) In this line for flag in "$CPPFLAGS" you should not use double-quotes, because the intent is to do word-split= ting on the contents of $CPPFLAGS. See: $ CPPFLAGS=3D"-I/opt/local/include -Wall" $ for flag in "$CPPFLAGS"; do echo $flag; done -I/opt/local/include -Wall $ for flag in $CPPFLAGS; do echo $flag; done -I/opt/local/include -Wall 2) Include options can also written with whitespace after the -I: -I/somedir is equivalent to -I /somedir To take this into account, rewrite the loop like this: next_is_includedir=3Dfalse for flag in $CPPFLAGS do if $next_is_includedir; then GUILE_CFLAGS=3D"$GUILE_CFLAGS -I $flag" next_is_includedir=3Dfalse else case "$flag" in -I) next_is_includedir=3Dtrue;; -I*) GUILE_CFLAGS=3D"$GUILE_CFLAGS $flag";; *) ;; esac fi done Bruno =2D-=20 In memoriam Hedwig Burgheim