<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Karl, <br>
    </p>
    <br>
    <blockquote>
      <pre wrap="">1) I'm afraid I don't really understand tex4ht file derivation, despite
Deimi's best efforts to explain.

</pre>
    </blockquote>
    Frankly speaking I cannot say that I understand it completely too :)
    <br>
    <br>
    <blockquote>
      <pre wrap="">3) It sure would be nice to have complete auto-generated dependencies,
as we were discussing some time ago. Maybe someday ...
</pre>
    </blockquote>
    <br>
    My attempt to have generated dependencies is on a github repo:<br>
    <a class="moz-txt-link-freetext" href="https://github.com/dgalcius/tex4ht-dev">https://github.com/dgalcius/tex4ht-dev</a>. <br>
    <br>
    What I tried to achieve: <br>
    <br>
    -1-  separate generation of code (4ht,htf, etc,)  and of
    documentation. <br>
    <font size="-1"><br>
    </font><br>
    <font size="-1"><tt>4ht $(tex4ht-4ht_derived): tex4ht-4ht.tex
        $(tex4ht-4ht_deps)</tt></font><br>
    <font size="-1"><tt>    tex $(tex_opts) $<</tt></font><br>
    <br>
    <font size="-1"><tt>4ht-doc $(tex4ht-4ht_doc): $(tex4ht-4ht_deps)</tt></font><br>
    <font size="-1"><tt>    $(HTTEX) $<</tt></font><br>
    <br>
    This <tt>is a rough template that I follow: for each seeded source
      tex file (foo.tex)</tt><br>
    <tt>I put two phony targets  "foo" and "foo-doc". In general it is
      much faster to generated</tt><br>
    <tt>code related files (4ht,htf,etc) than documentation and in most
      cases I want to generate code files only.</tt><br>
    <tt><br>
    </tt><br>
    -2- For each source tex file to have a .d  (dependency) file which
    is generated programmatically. <br>
    e.g. <br>
    tex4ht-c.tex  <=> tex4ht-c.d;  tex4ht-html4.tex <=>
    tex4ht-html.d, etc.<br>
    <br>
    tex4ht-c.d: <br>
    <font size="-1"><tt>define tex4ht-c_derived</tt><tt><br>
      </tt><tt> tex4ht.c\</tt><tt><br>
      </tt><tt>endef</tt><tt><br>
        <br>
      </tt><tt># deps files list from tex4ht-c.fls.</tt><tt><br>
      </tt><tt>define tex4ht-c_deps</tt><tt><br>
      </tt><tt> tex4ht-c.tex\</tt><tt><br>
      </tt><tt> common.tex\</tt><tt><br>
      </tt><tt> tex4ht.sty\</tt><tt><br>
      </tt><tt> tex4ht.4ht\</tt><tt><br>
      </tt><tt> html4.4ht\</tt><tt><br>
      </tt><tt> html4-math.4ht\</tt><tt><br>
      </tt><tt> plain.4ht\</tt><tt><br>
      </tt><tt> dratex.4ht\</tt><tt><br>
      </tt><tt> th4.4ht\</tt><tt><br>
      </tt><tt> ProTex.sty\</tt><tt><br>
      </tt><tt> AlProTex.sty\</tt><tt><br>
      </tt><tt> tex4ht-cpright.tex\</tt><tt><br>
      </tt><tt>endef</tt><tt><br>
        <br>
      </tt><tt># set main html file</tt><tt><br>
      </tt><tt>define tex4ht-c_doc</tt><tt><br>
      </tt><tt> html.dir/tex4ht-c/tex4ht-c.html</tt><tt><br>
      </tt><tt><br>
      </tt><tt>endef</tt></font><br>
    <br>
    .d file defines 3 variables: foo_derived (derived files list),
    foo_deps (dependency files list), and foo_doc (main html file).<br>
    <br>
    To remake all .d files I run: $ make d;<br>
    To remake one .d file I run: $ make foo.dd;<br>
    Note double "d" in case of one file. (<i>Should I explain why not
      foo.d?</i>)<br>
    <br>
    -3-  Different rules apply for .d file generation (code vs htf vs
    jar), so I set some awk scripts in extra_bin/ folder:<br>
      - fls2d  - processing fls. This is used for .4ht files<br>
      - flslg2d - processing fls and lg files. This is used for .htf 
    files<br>
      - jar2d - processing jar file<br>
    <div class="moz-cite-prefix"><br>
      .fls file is the one obtained by specifying -recorder option
      latex/tex run.<br>
      <br>
      *********************************************************<br>
      I went through every target that generate code removing circular
      dependencies in particular <br>
       and I consider this part more or less finished.  What I did not
      look into is an<i><br>
        update </i>target. <br>
      <br>
      I do not know if this approach of generating .d files is good and
      robust(!) enough. <br>
      <br>
      Beware!! my github repo is out of sync with svn repo for at least
      six month. <br>
      <br>
      <br>
      Any suggestions, comments are welcome!<br>
      <br>
      best regards, <br>
       -- deimi <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
    </div>
    <br>
  </body>
</html>