From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6212 invoked by alias); 12 Sep 2007 18:02:12 -0000 Received: (qmail 6201 invoked by uid 22791); 12 Sep 2007 18:02:10 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Sep 2007 18:02:03 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1IVWXF-0004Mm-00; Wed, 12 Sep 2007 20:01:57 +0200 Date: Wed, 12 Sep 2007 18:02:00 -0000 From: Andrew Lunn To: Mike Arthur Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20070912180157.GR3557@lunn.ch> Mail-Followup-To: Mike Arthur , ecos-discuss@ecos.sourceware.org References: <2a3305fe0709111554x64de173ej3b684623610db101@mail.gmail.com> <20070912070054.GQ3557@lunn.ch> <2a3305fe0709121012gf922917vc8ab6acb744a6e7a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a3305fe0709121012gf922917vc8ab6acb744a6e7a@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-11) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] How to modify CFLAGS within an ECM file? X-SW-Source: 2007-09/txt/msg00073.txt.bz2 On Wed, Sep 12, 2007 at 12:12:36PM -0500, Mike Arthur wrote: > > Take a look at: > > > > http://ecos.sourceware.org/docs-latest/cdl-guide/language.values.html > > > > In particular the first example after the table of operators, the > > example in the section Functions, and the documentation for is_substr() > > > > > I get this error while trying to import my .ecm file: > --------------------------------------------------------------------- > option CYGBLD_GLOBAL_CFLAGS: error > invalid command name "requires" > > > > > The ecm file looks like this: > -------------------------------------- > cdl_option CYGBLD_GLOBAL_CFLAGS { > requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -O2") } > }; > > > Do .ecm files have the same commands as .cdl? Ah, my error. I thought you wanted this in one of your .cdl files. You probably need to add some cdl somewhere, something like cdl_option CYGBLD_GLOBAL_CFLAGS_O2 { display "Compile with -02" default 0 no_define requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -O2") } } And then in your .ecm file cdl_option CYGBLD_GLOBAL_CFLAGS_O2 { user_value 1 } Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss