[Templates] TT and dependencies

Keith G. Murphy keithmur@mindspring.com
Mon, 13 Oct 2003 18:32:23 -0500


Randal L. Schwartz wrote:

>>>>>>"Keith" == Keith G Murphy <keithmur@mindspring.com> writes:
> 
> 
> Keith> Has anyone given thought or have a solution to the problem of
> Keith> expressing all possible dependencies in a page build?  I'm thinking of
> Keith> the situation of static builds and Makefiles.
> 
> <http://www.stonehenge.com/merlyn/LinuxMag/col38.html>.
> 
Wow, took me a while to get my head around that one.

I don't think it gets me where I'm wanting to go.  As I understand it, 
this is a situation where you have a one-to-one correspondence between 
the target files (in the installation directory), and a source file, 
either to be simply copied, or built using TT.

I'm thinking more about situations where you've got multiple files that 
are possibly prerequisites of the target file, and that can be via 
INCLUDE, PROCESS, etc., or plugins.

The more I think about it, the more I think you'd have to use some sort 
of pseudo-directives at the beginning of each source file, like...

Ahhh!!!  Perhaps the TAG_STYLE thing you did could at least be used to 
specify dependencies that could be generated using TT itself, prior to 
generating the real pages using the default tag style.  So you might 
have something like:

[* env.DESTDIR/thisfile.htm : env.LIBDIR/wrapper.tmpl 
env.DATADIR/datafile.txt *]
[% WRAPPER "$env.LIBDIR/wrapper.tmpl %]
[% USE items = datafile("$env.DATADIR/datafile.txt", delim='|' %]
[% END %]

So you could cheat that way by prespecifying the dependencies, and use 
TT to help build your Makefile.  Or something.

Or did I miss your point entirely?