[tex4ht-commits] [SCM] tex4ht updated: r740 - trunk/lit

karl at gnu.org.ua karl at gnu.org.ua
Sun Jun 14 00:35:33 CEST 2020


Author: karl
Date: 2020-06-14 01:35:32 +0300 (Sun, 14 Jun 2020)
New Revision: 740

Modified:
   trunk/lit/ChangeLog
   trunk/lit/Makefile
   trunk/lit/tex4ht-dir.m4
   trunk/lit/tex4ht-docbook-xtpipes.tex
   trunk/lit/tex4ht-html-speech-xtpipes.tex
   trunk/lit/tex4ht-javahelp-xtpipes.tex
   trunk/lit/tex4ht-jsml-xtpipes.tex
   trunk/lit/tex4ht-oo-xtpipes.tex
   trunk/lit/tex4ht-xhtml-xtpipes.tex
   trunk/lit/tex4ht-xhtmml-xtpipes.tex
   trunk/lit/xtpipes.tex
Log:
java compilation in make or .tex but not both; from Vincent

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/ChangeLog	2020-06-13 22:35:32 UTC (rev 740)
@@ -1,3 +1,18 @@
+2020-06-13  Vincent Bela\"iche  <vincent.belaiche at gmail.com>
+
+	* xtpipes.tex,
+	* tex4ht-xhtmml-xtpipes.tex,
+	* tex4ht-xhtml-xtpipes.tex,
+	* tex4ht-oo-xtpipes.tex,
+	* tex4ht-jsml-xtpipes.tex,
+	* tex4ht-javahelp-xtpipes.tex,
+	* tex4ht-html-speech-xtpipes.tex,
+	* tex4ht-docbook-xtpipes.tex: Make all java system calls
+	conditional on "\ifdojava" switch.
+	* tex4ht-dir.m4: Add a "\ifdojava" switch.
+	* Makefile: Refactor the "do_java" option so that, and propagate
+	the option to "tex4ht-dir.tex" via "tex4ht-dir.m4".
+
 2020-06-11  Karl Berry  <karl at freefriends.org>
 
 	* Makefile (all): run checklog.lua here, instead of in
@@ -19,7 +34,7 @@
 	(tex4ht_fonts_cjk_derived, tex4ht_fonts_cjk_utf8_derived): define
 	as the first .htf file created, instead of the .html, since the
 	.html is not installed.
-		
+
 2020-06-07 Michal Hoftich  <michal.h21 at gmail.com>
 
 	* checklog.lua: script for detection of errors in the log files.

Modified: trunk/lit/Makefile
===================================================================
--- trunk/lit/Makefile	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/Makefile	2020-06-13 22:35:32 UTC (rev 740)
@@ -22,9 +22,24 @@
 # List of directories we'll substitute into tex4ht-dir.tex below:
 dirs = homedir wd htmldir xtpipesdir deriveddir texmf_t4ht_bin
 
-# Uncomment to enable Java compilations:
-#do_java = 1
+# 0 = in Makefile only
+# 1 = in .tex only
+# 2 = no java compilation
+do_java ?= 2
+java_in_make := false
+java_in_tex := false
+ifeq ($(do_java),0)
+java_in_make := true
+else ifeq ($(do_java),1)
+java_in_tex := true
+endif
 
+ifeq ($(java_in_make),true)
+java_or_not=$1
+else
+java_or_not=#
+endif
+
 tex_opts = --interaction=nonstopmode -recorder #--file-line-error
 tex_1opt = "$(tex_opts)" # must be quoted, passing to shell script
 dev_null = </dev/null    # when we don't call tex directly.
@@ -55,7 +70,7 @@
 
 # Substitute directories used, especially for Java.
 tex4ht-dir.tex: tex4ht-dir.m4
-	m4 $(foreach dir,$(dirs),-D $(dir)="$($(dir))") $< >$@ || rm -f $@
+	m4 $(foreach def,$(dirs) java_in_tex,-D $(def)="$($(def))") $< >$@ || rm -f $@
 
 # Start long list of generated files from the literate sources. Needs more.
 derived = 
@@ -96,7 +111,7 @@
 derived += $(tex4ht_docbook_derived)
 tex4ht_docbook_derived = docbook.4ht docbook-math.4ht docbook-mml.4ht
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_docbook_xtpipes_derived)
 tex4ht_docbook_xtpipes_derived = docbook.4xt $(wd)/src/DbUtilities.java
 endif
@@ -178,7 +193,7 @@
 derived += $(tex4ht_html_speech_derived)
 tex4ht_html_speech_derived = html-speech.4ht html-speech-math.4ht emacspeak.4ht
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_html_speech_xtpipes_derived)
 tex4ht_html_speech_xtpipes_derived = htspk.4xt $(wd)/src/HtSpk.java
 endif
@@ -217,7 +232,7 @@
 derived += $(tex4ht_javahelp_derived)
 tex4ht_javahelp_derived = javahelp.4ht javahelp-a.4ht
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_javahelp_xtpipes_derived)
 tex4ht_javahelp_xtpipes_derived = javahelp.4xt
 endif
@@ -225,7 +240,7 @@
 derived += $(tex4ht_jsmath_derived)
 tex4ht_jsmath_derived = jsmath.4ht html-jsmath.4ht
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_jsml_xtpipes_derived)
 tex4ht_jsml_xtpipes_derived = \
   jsml.4xt \
@@ -253,7 +268,7 @@
 derived += $(tex4ht_html5_derived)
 tex4ht_html5_derived = html5.4ht
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_oo_xtpipes_derived)
 tex4ht_oo_xtpipes_derived = \
    oo-math.4xt oo-text.4xt \
@@ -290,12 +305,12 @@
 derived += $(tex4ht_word_derived)
 tex4ht_word_derived = htmlw.4ht
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_xhtml_xtpipes_derived)
 tex4ht_xhtml_xtpipes_derived = xhtml.4xt $(wd)/src/XhtmlEmails.java
 endif
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(tex4ht_xhtmml_xtpipes_derived)
 tex4ht_xhtmml_xtpipes_derived = xhtmml.4xt $(wd)/src/XhtmmlUtilities.java
 endif
@@ -305,7 +320,7 @@
 
 # wripro.tex generates nothing (not literate).
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 derived += $(xtpipes_derived)
 xtpipes_derived = \
   $(addprefix $(wd)/src/, \
@@ -418,7 +433,7 @@
 $(tex4ht_jsmath_derived): tex4ht-jsmath.tex $(common)
 	htlatex $< "html,3,sections+" "" "" $(tex_1opt)
 
-$(tex4ht_jsml_xtpipes_derived): tex4ht-jsml-xtpipes.tex $(common) #$(wd)/bin/xtpipes.jar
+$(tex4ht_jsml_xtpipes_derived): tex4ht-jsml-xtpipes.tex $(common) $(call java_or_not,$(wd)/bin/xtpipes.jar)
 	htlatex $< "xhtml,next,3" "" "" $(tex_1opt)
 
 $(tex4ht_jsml_derived): tex4ht-jsml.tex $(common)
@@ -609,7 +624,7 @@
 # 

 # Java.
 
-ifdef do_java
+ifeq ($(java_in_make),true)
 $(wd)/bin/xtpipes.jar: $(xtpipes_derived)
 	mkdir -p $(xtpipesdir)
 	find $(wd)/src -iname '*.java' -print0 \

Modified: trunk/lit/tex4ht-dir.m4
===================================================================
--- trunk/lit/tex4ht-dir.m4	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-dir.m4	2020-06-13 22:35:32 UTC (rev 740)
@@ -8,3 +8,5 @@
 \def\TEXMFTEXivHT{\HOME texmf/tex/generic/tex4ht/}
 \def\TEXMFTEXivBIN{\HOME texmf_t4ht_bin()/}
 \def\TEXMFTEXivXTPIPES{\HOME texmf/tex4ht/xtpipes/}
+\newif\ifdojava
+\dojava`'java_in_tex()

Modified: trunk/lit/tex4ht-docbook-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-docbook-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-docbook-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -49,9 +49,11 @@
 
 \AtEndDocument{\OutputCodE\<DbUtilities.java\>}
 
-\Needs{"
+\ifdojava
+  \Needs{"
     javac DbUtilities.java -d \XTPIPES
 "}
+\fi
 
 \<DbUtilities.java\><<<
 package tex4ht;
@@ -514,7 +516,7 @@
 /* is the TeX4ht Project <http://tug.org/tex4ht>.         */
 >>>
 
-
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
      ;  
@@ -527,6 +529,7 @@
      cp \XTPIPES xtpipes/lib/* 
         \TEXMFTEXivXTPIPES
 "}}
+\fi
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \end{document}

Modified: trunk/lit/tex4ht-html-speech-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-html-speech-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-html-speech-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -146,10 +146,11 @@
 
 
 \AtEndDocument{\OutputCodE\<HtSpk.java\>}
-
-\Needs{"
+\ifdojava
+  \Needs{"
     javac HtSpk.java      -d \XTPIPES . 
 "}
+\fi
 
 \<HtSpk.java\><<<
 package tex4ht;
@@ -2415,6 +2416,7 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
      ;  
@@ -2426,10 +2428,10 @@
      ;
      mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN . 
 "}}
+\fi
 
 
 
-
 \end{document}
 
 

Modified: trunk/lit/tex4ht-javahelp-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-javahelp-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-javahelp-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -624,7 +624,7 @@
 
 
 
-
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
      ;  
@@ -636,5 +636,6 @@
      ;
      if [ ! -d \TEXMFTEXivXTPIPES\space]; then exit 1; fi
 "}}
+\fi
 
 \end{document}

Modified: trunk/lit/tex4ht-jsml-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-jsml-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-jsml-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -147,9 +147,11 @@
 
 \AtEndDocument{\OutputCodE\<HtJsml.java\>}
 
-\Needs{"
+\ifdojava
+  \Needs{"
     javac HtJsml.java -d \XTPIPES
 "}
+\fi
 
 \<HtJsml.java\><<<
 package tex4ht;
@@ -180,12 +182,14 @@
 %%%%%%%%%%%%%
 
 
-\AtEndDocument{ 
+\AtEndDocument{%
    \OutputCodE\<GroupMn.java\> 
-} 
-\Needs{"
+ }
+\ifdojava 
+  \Needs{"
     javac GroupMn.java -d \XTPIPES
 "} 
+\fi
  
 \<GroupMn.java\><<< 
 package tex4ht;
@@ -789,14 +793,17 @@
 >>>
 
 
-\AtEndDocument{ 
+\AtEndDocument{%
    \OutputCodE\<JsmlMathBreak.java\> 
-} 
-\Needs{"
+ }
+
+\ifdojava
+  \Needs{"
     javac -classpath \LIB xtpipes.jar
           JsmlMathBreak.java
           -d \XTPIPES . 
-"} 
+"}
+\fi
  
 \<JsmlMathBreak.java\><<< 
 package tex4ht;
@@ -989,12 +996,14 @@
 
 
 
-\AtEndDocument{ 
+\AtEndDocument{ %
    \OutputCodE\<JsmlFilter.java\> 
-} 
-\Needs{"
+ }
+\ifdojava
+  \Needs{"
     javac JsmlFilter.java -d \XTPIPES
-"} 
+"}
+\fi 
  
 \<JsmlFilter.java\><<< 
 package tex4ht;
@@ -3806,7 +3815,7 @@
 
 
 
-
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES
      ;  
@@ -3821,9 +3830,9 @@
      cp \XTPIPES xtpipes/lib/* 
         \TEXMFTEXivXTPIPES
 "}}
+\fi
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \end{document}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/lit/tex4ht-oo-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-oo-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-oo-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -281,9 +281,11 @@
 
 \AtEndDocument{\OutputCodE\<OoUtilities.java\>}
 
-\Needs{"
+\ifdojava
+  \Needs{"
     javac OoUtilities.java -d \XTPIPES
 "}
+\fi
 
 \<OoUtilities.java\><<<
 package tex4ht;
@@ -1541,9 +1543,11 @@
 
 \AtEndDocument{\OutputCodE\<OomFilter.java\>}
 
-\Needs{"
+\ifdojava
+  \Needs{"
     javac OomFilter.java     -d \XTPIPES
 "}
+\fi
 
 \<OomFilter.java\><<<
 package tex4ht;
@@ -1606,9 +1610,11 @@
 
 \AtEndDocument{\OutputCodE\<OoFilter.java\>}
 
-\Needs{"
+\ifdojava
+  \Needs{"
     javac OoFilter.java      -d \XTPIPES
 "}
+\fi
 
 \<OoFilter.java\><<<
 package tex4ht;
@@ -1955,7 +1961,7 @@
 >>>
 
 
-
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
      ;  
@@ -1970,5 +1976,6 @@
      cp \XTPIPES xtpipes/lib/* 
         \TEXMFTEXivXTPIPES
 "}}
+\fi
 
 \end{document}

Modified: trunk/lit/tex4ht-xhtml-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-xhtml-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-xhtml-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -87,14 +87,16 @@
 >>>
 
 
-\AtEndDocument{ 
+\AtEndDocument{%
    \OutputCodE\<XhtmlEmails.java\> 
-} 
-\Needs{"
+ }
+\ifdojava
+  \Needs{"
     javac -classpath \TEXMFTEXivBIN tex4ht.jar
           XhtmlEmails.java
           -d \XTPIPES
-"} 
+"}
+\fi
  
 \<XhtmlEmails.java\><<< 
 package tex4ht;
@@ -632,7 +634,7 @@
 
 
 
-
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
      ;  
@@ -649,6 +651,7 @@
      cp \XTPIPES xtpipes/lib/* 
         \TEXMFTEXivXTPIPES
 "}}
+\fi
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/lit/tex4ht-xhtmml-xtpipes.tex
===================================================================
--- trunk/lit/tex4ht-xhtmml-xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/tex4ht-xhtmml-xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -51,11 +51,13 @@
 % 

 \AtEndDocument{\OutputCodE\<XhtmmlUtilities.java\>}
 
-\Needs{"
+\ifdojava
+  \Needs{"
   if [ ! -d \XTPIPES\space]; then exit 1; fi
   ;
   javac XhtmmlUtilities.java -d \XTPIPES
-"}
+  "}
+\fi
 
 \<XhtmmlUtilities.java\><<<
 package tex4ht;
@@ -723,6 +725,7 @@
 % END END END END END END END END END END END END END END END END 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+\ifdojava
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
      ;  
@@ -740,8 +743,8 @@
      \TEXMFTEXivXTPIPES
      ;
 "}}
+\fi
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \end{document}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/lit/xtpipes.tex
===================================================================
--- trunk/lit/xtpipes.tex	2020-06-12 22:34:58 UTC (rev 739)
+++ trunk/lit/xtpipes.tex	2020-06-13 22:35:32 UTC (rev 740)
@@ -227,7 +227,7 @@
 %    mkdir -p work.dir/xtpipes
 % "}
 
-
+\ifdojava
 \ifOption{win} {}{
 \AtEndDocument{\Needs{"
     find \WORK\space -type f -iname '*.java' -print0
@@ -235,6 +235,7 @@
     ;
 "}}
 }
+\fi
 
 
 \ifOption{win} {
@@ -4471,6 +4472,7 @@
 
 ../../..;..;../../jldoc;../../xtpipes/cgjsapi.jar;../../xtpipes/xtpipes.jar;../../jldoc/jldoc.jar;../../ml2xml.dir/ml2xml.dir/bin/ml2xml.jar
 
+\ifdojava
 \ifOption{win} {}{
 \AtEndDocument{\Needs{%
     "pushd \XTPIPES || exit 1
@@ -4489,9 +4491,11 @@
         \HOME texmf/tex4ht/xtpipes/.
 "}}
 }
+\fi
 
 
 
+\ifdojava
 \ifOption{win} {}{
   \AtEndDocument{\Needs{"
       mkdir -p \LIB\space || exit 1
@@ -4507,7 +4511,8 @@
       ;
       mv \XTPIPES xtpipes.jar \LIB
       ;
-"}}}
+      "}}}
+\fi
 
 
 \end{document}



More information about the tex4ht-commits mailing list.