[tex4ht] java modules

Vincent Belaïche vincent.belaiche at gmail.com
Fri Jun 5 21:32:33 CEST 2020


Here is a fix for the problem that you observed.
I did not have the same thing. Probably my cp version is not the same
and does not cause an error when the wildcard expansion is empty.
That is strange because I tried some "cd /tmp ; mkdir toto; cp
I-dont-exist/* toto" in sh and it did not work.
I am a bit puzzled why I did not observed the same error.
Actually the ./xtpipes.dir/lib directory does not exist because in the
whole tex script nothing is written to the nor aren't there any mkdir
thereof. So my fix is that I abruptly removed the faulty instruction.

Concerning the java compilation, maybe it would have been more
appropriate to disable it in the .tex by default unless do_java is
defined and keep it enabled always in the makefile (or maybe do_java
could switch where we want it to be made, in both places, only in
makefile, only in .tex files).
That would be easy to do through the texh4t-dir.tex that could contain
a switch passed from the makefile.


Le ven. 5 juin 2020 à 20:05, Karl Berry <karl at freefriends.org> a écrit :
>
> I committed the step3 changes (r725). I also inserted a variable in the
> Makefile now, do_java, which enables all the Java stuff(*). It's off by
> default. I figure you can run make do_java=1 for testing for now.
>
> I changed all the bare "mkdir" calls to "mkdir -p" to avoid the useless
> "File exists" diagnostics when the directory already exists.
>
>     I am not sure whether it is OK or not as I kept the java compilation
>     in the .tex system calls. Is that what you wanted ?
>
> It was certainly a good step to replace all the hardwired paths with the
> substituted paths in any case.
>
> I guess it would be ideal to run javac from the Makefile instead of all
> that crazy embedding into TeX specials, to avoid unnecessary
> recompilation (it takes an awfully long time to run all that Java
> stuff), but that sounds like a big job.
>
>
> Meanwhile, I get two errors in the Java runs now. One is
> tex4ht-html-speech-xtpipes:
>
> System call: pushd ./xtpipes.dir/|| exit 1 ; jar cf tex4ht.jar * ; popd ; mkdir -p ./tex4ht.dir/texmf/tex4ht/bin/|| exit 1 ; mv ./xtpipes.dir/tex4ht.jar ./tex4ht.dir/texmf/tex4ht/bin/. ; cp ./xtpipes.dir/lib/* ./tex4ht.dir/texmf/tex4ht/xtpipes/.
> ~/tex/tex4ht/lit/xtpipes.dir ~/tex/tex4ht/lit
> ~/tex/tex4ht/lit
> cp: cannot stat './xtpipes.dir/lib/*': No such file or directory
> (In earlier runs, the mv also had an error there. I guess it is not
> really starting from scratch.)
>
> Another is from tex4ht-javahelp-xtpipes:
> System call: pushd || exit 1 ; jar cf tex4ht.jar * ; popd ; mv tex4ht.jar ; if [ ! -d  ]; then exit 1; fi ; cp xtpipes/lib/*
> sh: line 0: pushd: no other directory
> --- Warning --- System return: 256
>
> I did not try to fix.
>
> Thanks,
> Karl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step3-1.diff
Type: application/octet-stream
Size: 1318 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex4ht/attachments/20200605/5205a093/attachment.obj>


More information about the tex4ht mailing list.