black hole wrote:
>> P.S. a workaround:  Inside the template proper, add this:
>>
>>    [= (out-move (get "trace-file")) =]
> 
> Thank you, that'll do it. However, I am trying to solve another situation.
> I have a definitions file and need to set a name to be a list of files
> found in a specific directory. One way to do it would be (1):
> list=my/dir/file01;
> list=my/dir/file02;
> ...
> I don't find it practical when there are lots of files (like 50+).
> I could use text editor and shell to do the job. But in case a new file is
> added to the directory, or an existing file is removed, I have to re-edit
> the definitions file, which is what I want to avoid.

> line 0: autogen definitions template.tpl;
> line 1: `for i in my/dir/*; do echo list="${i};"; done`

You almost have it.  Use the "#shell" / "#endshell" directives.
The backquotes create a string.  That string may contain
arbitrary contents, including stuff that looks like AutoGen
definitions.  Or shell script text.  Anything.  Try this:

autogen definitions template.tpl;
#shell
for i in `find my/dir -name '*.def'`
do echo "list = '${i}';"; done
#endshell

Cheers - Bruce

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users

Reply via email to