Re: variable not defined on my own define-rule
Vaclav Slavik <[email protected]> Mon, 14 Sep 2009 09:48:51 +0200
| Newsgroups | gmane.comp.sysutils.bakefile.devel |
|---|---|
| Message-ID | <1252914531.6361.6.camel@localhost> |
--===============0955047583223660840== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-cB3W2EbQHdNOBBMNgDr5" --=-cB3W2EbQHdNOBBMNgDr5 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2009-09-13 at 22:45 +0000, Jeremy Cowgar wrote: > > Using (in a template) a variable before defining it (in target's body, > > after the template was processed). Hence "...is not defined" error. >=20 > Um I gathered that. Wasn't quite clear from what you wrote... > I was assuming I would get a response on how to fix it, but=20 > I guess that's not exactly what I asked, although it could very well be=20 > assumed.=20 I kind of assumed that the way to fix it is obvious: don't use variables before you define them (IOW, don't create the command line until you collected the sources information). Or, to put it the other way, define them before you use them (i.e. define __source at the top of the template). Your best bet probably is to define __source as empty first, then put the command into a variable set with <set var=3D"my_cmd" eval=3D"0">...$(__source)...</set> and then use <command>$(my_cmd)</command>. That should do what you want. Vaclav --=-cB3W2EbQHdNOBBMNgDr5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEABECAAYFAkqt9WMACgkQxDYa/UZSZMli1QCcCDXzac1qbozBD8Kwi3/Y3JVZ GksAnAjZsRLtXor3pcdJkPJ2ofH86AN0 =Ep5i -----END PGP SIGNATURE----- --=-cB3W2EbQHdNOBBMNgDr5-- --===============0955047583223660840== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july --===============0955047583223660840== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bakefile-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bakefile-devel --===============0955047583223660840==--