From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7313 invoked by alias); 8 Oct 2003 19:51:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7306 invoked from network); 8 Oct 2003 19:51:20 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sources.redhat.com with SMTP; 8 Oct 2003 19:51:20 -0000 Received: from Hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 5218816C7EC6; Wed, 8 Oct 2003 21:51:20 +0200 (CEST) To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: Use program_transform_name correctly References: <20031007225305.GA13082@nevyn.them.org> <20031007235921.8FB0B158F81@kanga.canids.net> <20031008010510.GA15693@nevyn.them.org> <20031008193112.GA14518@nevyn.them.org> From: Andreas Schwab X-Yow: Is it clean in other dimensions? Date: Wed, 08 Oct 2003 19:51:00 -0000 In-Reply-To: <20031008193112.GA14518@nevyn.them.org> (Daniel Jacobowitz's message of "Wed, 8 Oct 2003 15:31:12 -0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-10/txt/msg00251.txt.bz2 Daniel Jacobowitz writes: > On Wed, Oct 08, 2003 at 02:17:26PM -0500, Jim Blandy wrote: >> >> Daniel Jacobowitz writes: >> > Conveniently this is no longer an issue in the src repository (or in >> > gcc). The toplevel configure script now guarantees that >> > $(program_transform_name) will not be empty. So $$t it is. >> >> But doesn't that mean I can just say: >> >> sed '$(program_transform_name)' >> >> since Make substitution doesn't respect single quotes in shell >> commands? > > I'm not sure. This is all complicated by the way that things get > escaped if $(program_transform_name) contains a ' or a \. And sed > scripts often do contain backslashes: > --program-transform-name='s,(gdb),\1-6.0,' Single quotes won't work in either case, whether you write t='$(program_transform_name)'; sed $$t or sed '$(program_transform_name)' but in the first case word splitting is performed on the sed argument. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."