From patchwork Mon May 16 13:39:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 95754 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 4DE19B6EF2 for ; Mon, 16 May 2011 23:39:37 +1000 (EST) Received: (qmail 18066 invoked by alias); 16 May 2011 13:39:34 -0000 Received: (qmail 17996 invoked by uid 22791); 16 May 2011 13:39:33 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 May 2011 13:39:16 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C10BECB0227; Mon, 16 May 2011 15:39:15 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iYsFlDFfbH3J; Mon, 16 May 2011 15:39:12 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id BF1EFCB027F; Mon, 16 May 2011 15:39:12 +0200 (CEST) Subject: Re: [Patch] fixinclude: shell-quote testing file Mime-Version: 1.0 (Apple Message framework v1084) From: Tristan Gingold In-Reply-To: Date: Mon, 16 May 2011 15:39:12 +0200 Cc: "gcc-patches@gcc.gnu.org Patches" Message-Id: <9B70FC5D-BC2B-497A-BBE2-14FF47B76B82@adacore.com> References: <965D691B-295D-4BF9-93DC-33B63B53634F@adacore.com> To: Bruce Korb 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 On May 16, 2011, at 3:33 PM, Bruce Korb wrote: > On Mon, May 16, 2011 at 6:15 AM, Tristan Gingold wrote: >> Hi, >> >> one of the main VMS include files has a dollar in its name (decc$types.h), which is not shell friendly. >> >> As a consequence, when the name is reused by check.tpl to create a baseline file, must be quoted. > >> Ok for trunk ? > >> diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl >> index b239d8b..0f3937a 100644 >> --- a/fixincludes/check.tpl >> +++ b/fixincludes/check.tpl >> @@ -87,7 +87,7 @@ FOR fix =][= >> ELSE =] >> -cat >> [= >> - IF (exist? "files") =][= >> - files[0] =][= >> - ELSE =]testing.h[= >> - ENDIF =] <<_HACK_EOF_ > > Easier would be to just single (apostrophe) quote the string: > > cat >> '[= (if (exist? "files") (get "files[0]") "testing.h") > =]' <<_HACK_EOF_ > > Or, as Andreas said after I typed the above:) > > cat >> [= (raw-shell-str (if (exist? ...))) =] <<_HACK_EOF_ Sure. The patch below is ok for 'make check', is it also ok for you ? Tristan. --- a/fixincludes/check.tpl +++ b/fixincludes/check.tpl @@ -85,11 +85,8 @@ FOR fix =][= (get "hackname") )) ) =][= ELSE =] -cat >> [= - IF (exist? "files") =][= - files[0] =][= - ELSE =]testing.h[= - ENDIF =] <<_HACK_EOF_ +cat >> [= (raw-shell-str (if (exist? "files") (get "files[0]") "testing.h")) + =] <<_HACK_EOF_ #if defined( [=(. HACK)=]_CHECK )