From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21985 invoked by alias); 1 Aug 2006 16:27:57 -0000 Received: (qmail 21950 invoked by uid 22791); 1 Aug 2006 16:27:55 -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; Tue, 01 Aug 2006 16:27:52 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1G7x5v-0001Pu-00; Tue, 01 Aug 2006 18:27:47 +0200 Date: Tue, 01 Aug 2006 16:27:00 -0000 To: Grant Edwards Cc: eCos Discussion Message-ID: <20060801162747.GB2800@lunn.ch> Mail-Followup-To: Grant Edwards , eCos Discussion References: <20060801023656.GA28316@grante.dsl.visi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060801023656.GA28316@grante.dsl.visi.com> User-Agent: Mutt/1.5.12-2006-07-14 From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] CDL question X-SW-Source: 2006-08/txt/msg00012.txt.bz2 On Mon, Jul 31, 2006 at 09:36:58PM -0500, Grant Edwards wrote: > I've read through the CDL sections of the component developer's > guide, but I can't figure out what the command is to set a data > flavored option to an expression involving it's default value > or it's current value. > > Assume I've got an ecos.ecc file that I generated via an > "ecosconfig new whatever" command. Now I want to change the > value of CYGBLD_GLOBAL_CFLAGS (which has its default value) to > add "-DFooBar". This needs to be done in a shell script so > that I can automate the entire build process. Usually when I > need to make automated changes to ecos.ecc I create a .cdl file > and import it like this: > > cat >.tmp$$.cdl < cdl_option CYGBLD_BUILD_REDBOOT_WITH_GDB {user_value 0} > cdl_option CYGBLD_BUILD_REDBOOT_WITH_ZLIB {user_value 0} > EOF > ecosconfig import .tmp$$.cdl > > However, I can't figure out what the TCL expression is for "the > current value of option CYG_WHATEVER". I thought perhaps something like > > option CYGBLD_GLOBAL_CFLAGS {user_value "$CYGBLD_GLOBAL_CFLAGS -DFooBar"} > > But that doesn't work. I'm sure it's something obvious, but > I've never been able to grok TCL no matter how hard I try... This method will not work. tcl has no access to CDL variables. $CYGBLD_GLOBAL_CFLAGS means nothing to tcl. You could use the cdl_option CYGPKG_KERNEL_CFLAGS_REMOVE, CYGPKG_KERNEL_LDFLAGS_ADD etc to add FooBar to specific packages, in this example the kernel. Another idea would be something like adding a custom package with CDL something like: cdl_option CYGBLD_DIDDLE_THE_FLAGS { flavor data default_value "" requires { is_substr(CYGBLD_GLOBAL_CFLAGS, CYGBLD_DIDDLE_THE_FLAGS) } } Then you can set CYGBLD_DIDDLE_THE_FLAGS from your import file and the inference engine will do the rest. 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