Loading ...
Sorry, an error occurred while loading the content.
 

[Cheetahtemplate-discuss] dependency information

Expand Messages
  • Terrel Shumway
    I am setting up Cheetah in an environment with dependency-tree based rebuild. ... $TITLE $CONTENT ... This
    Message 1 of 1 , Dec 31, 2003
      I am setting up Cheetah in an environment with dependency-tree based
      rebuild.

      ---INDEX.tmpl---
      <html><head><title>$TITLE</title></head><body>$CONTENT</body></html>
      ---TITLE.tmpl---
      This is the Page Title
      ---CONTENT.tmpl--
      <h1>$TITLE</h1>
      <p>blah blah blah</p>
      -----------------

      a makefile might look like this:
      ---
      index.html: INDEX.tmpl TITLE.tmpl CONTENT.tmpl
      filltemplates $^ -o $@
      ---

      What I need from Cheetah that it doesn't give now, is dependency
      information. When I compile a template, I want an extra class attribute,
      e.g. "requires" or "uses". For CONTENT.tmpl, this would be ["TITLE"],
      for INDEX.tmpl it would be ["TITLE","CONTENT"], for TITLE.tmpl it would
      be []

      For simple placeholders, this seems easy enough, but things quickly get
      hairy for real templates

      for this template
      ---------
      #set $TITLE "my title"
      #for $bar in $foo:
      $beep.tag $bar.baz
      #end for
      ---------
      uses should be ["foo","beep"]
      and maybe another attribute "provides" could be ["TITLE"]
      note that "bar" does not appear in either list, and only the top-level
      element of $beep.tag shows up (I don't need the .tag).
      What I need are top-level r-values that are not also l-values.

      I don't mind digging into the code myself, but I appreciate any
      pointers, caveats, or suggestions anyone has to offer.

      -- Terrel

      p.s. #import and friends may also generate dependencies, but I am not
      too concerned about that yet.

      pps: the system I have works now, but I just do a brute-force rebuild of
      everything rather than tracking individual dependencies.




      -------------------------------------------------------
      This SF.net email is sponsored by: IBM Linux Tutorials.
      Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
      Free Linux Tutorials. Learn everything from the bash shell to sys admin.
      Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    Your message has been successfully submitted and would be delivered to recipients shortly.