Re: [tex4ht] dependencies, new and incomplete

2017-05-08 Thread Karl Berry
Deimi - this all sounds great to me. Separating doc from code generation
is excellent; that's been a problem since day one. I look forward to the
day when we can just type make and the right thing
happens. Unfortunately I don't know when I'll have a chance to help
bring all this to fruition :( ... -k

P.S. Not a big deal, apparently your gmail is configured to send only
HTML. When you have a chance, could you please change it to at least do
multipart/alternative, if not just plain text? Thanks.


Re: [tex4ht] dependencies, new and incomplete

2017-05-05 Thread Deimantas Galcius

  
  
Hi Karl, 



  1) I'm afraid I don't really understand tex4ht file derivation, despite
Deimi's best efforts to explain.



Frankly speaking I cannot say that I understand it completely too :)



  3) It sure would be nice to have complete auto-generated dependencies,
as we were discussing some time ago. Maybe someday ...



My attempt to have generated dependencies is on a github repo:
https://github.com/dgalcius/tex4ht-dev. 

What I tried to achieve: 

-1-  separate generation of code (4ht,htf, etc,)  and of
documentation. 


4ht $(tex4ht-4ht_derived): tex4ht-4ht.tex
$(tex4ht-4ht_deps)
    tex $(tex_opts) $<

4ht-doc $(tex4ht-4ht_doc): $(tex4ht-4ht_deps)
    $(HTTEX) $<

This is a rough template that I follow: for each seeded source
  tex file (foo.tex)
I put two phony targets  "foo" and "foo-doc". In general it is
  much faster to generated
code related files (4ht,htf,etc) than documentation and in most
  cases I want to generate code files only.


-2- For each source tex file to have a .d  (dependency) file which
is generated programmatically. 
e.g. 
tex4ht-c.tex  <=> tex4ht-c.d;  tex4ht-html4.tex <=>
tex4ht-html.d, etc.

tex4ht-c.d: 
define tex4ht-c_derived
   tex4ht.c\
  endef

  # deps files list from tex4ht-c.fls.
  define tex4ht-c_deps
   tex4ht-c.tex\
   common.tex\
   tex4ht.sty\
   tex4ht.4ht\
   html4.4ht\
   html4-math.4ht\
   plain.4ht\
   dratex.4ht\
   th4.4ht\
   ProTex.sty\
   AlProTex.sty\
   tex4ht-cpright.tex\
  endef

  # set main html file
  define tex4ht-c_doc
   html.dir/tex4ht-c/tex4ht-c.html
  
  endef

.d file defines 3 variables: foo_derived (derived files list),
foo_deps (dependency files list), and foo_doc (main html file).

To remake all .d files I run: $ make d;
To remake one .d file I run: $ make foo.dd;
Note double "d" in case of one file. (Should I explain why not
  foo.d?)

-3-  Different rules apply for .d file generation (code vs htf vs
jar), so I set some awk scripts in extra_bin/ folder:
  - fls2d  - processing fls. This is used for .4ht files
  - flslg2d - processing fls and lg files. This is used for .htf 
files
  - jar2d - processing jar file

  .fls file is the one obtained by specifying -recorder option
  latex/tex run.
  
  *
  I went through every target that generate code removing circular
  dependencies in particular 
   and I consider this part more or less finished.  What I did not
  look into is an
update target. 
  
  I do not know if this approach of generating .d files is good and
  robust(!) enough. 
  
  Beware!! my github repo is out of sync with svn repo for at least
  six month. 
  
  
  Any suggestions, comments are welcome!
  
  best regards, 
   -- deimi 
  
  
  
  
  
  
  


  




Re: [tex4ht] dependencies, new and incomplete

2017-05-05 Thread Michal Hoftich
Hi Karl,

I've just added basic support for skak package, so I could test
whether the html4.4ht contains configurations for skak.4ht. It doesn't
:


>
> 2) Nevertheless, by grepping the logs, I see that nearly everything
> depends on mktex4ht.4ht and tex4ht.sty. I just added those as common
> dependencies (except for the files which generate them). Hope it helps
> and doesn't break anything. Easy enough to revert/tweak, of course.

I  think that this change causes massive recompilations even after
minor changes. I think better solution could be to compile the seeding
files (tex4ht-html4.tex and so on) twice when they were changed.

Best regards,
Michal