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

karl at gnu.org.ua karl at gnu.org.ua
Tue Jun 16 02:59:36 CEST 2020


Author: karl
Date: 2020-06-16 03:59:35 +0300 (Tue, 16 Jun 2020)
New Revision: 741

Modified:
   trunk/lit/ChangeLog
   trunk/lit/Makefile
Log:
java (re)compilation dependencies, from vincent

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2020-06-13 22:35:32 UTC (rev 740)
+++ trunk/lit/ChangeLog	2020-06-16 00:59:35 UTC (rev 741)
@@ -1,3 +1,21 @@
+2020-06-15  Vincent Bela\"iche  <vincent.belaiche at gmail.com>
+
+	* Makefile (do_java): Add comment about do_java=0|1 needing
+	tex4ht-dir.tex refresh.
+	(xtpipe_jar): Replace java_or_not by xtpipes_jar, as the only
+	purpose is to control making of xtpipes.jar, and transpose the
+	dependency between in-tex and in-make, i.e., xtpipes.jar is needed
+	only when java is compiled in tex.
+	Replace all the "ifeq ($(java_in_make),true)" by "ifneq
+	($(do_java),2)".
+	(xtpipes_derived): Add $(xtpipes_jar).
+	($(tex4ht_jsml_xtpipes_derived)): Replace $(call
+	java_or_not,$(wd)/bin/xtpipes.jar) by $(xtpipes_jar) in the
+	dependency list, so there is a dependency only when compiling java
+	in tex.
+	(jar): Suppress producing xtpipes.jar, this is needed only for
+	compiling in tex.
+
 2020-06-13  Vincent Bela\"iche  <vincent.belaiche at gmail.com>
 
 	* xtpipes.tex,

Modified: trunk/lit/Makefile
===================================================================
--- trunk/lit/Makefile	2020-06-13 22:35:32 UTC (rev 740)
+++ trunk/lit/Makefile	2020-06-16 00:59:35 UTC (rev 741)
@@ -22,6 +22,12 @@
 # List of directories we'll substitute into tex4ht-dir.tex below:
 dirs = homedir wd htmldir xtpipesdir deriveddir texmf_t4ht_bin
 
+# do_java variable to control how tex4ht.jar is built.
+# do_java=1 works only if tex4ht-dir.tex is not already built with
+# do_java=0 option.
+# Similarly do_java=0 will keep java compilation in tex in addition to
+# building in Makefile if tex4ht-dir.tex was already built with
+# do_java=1
 # 0 = in Makefile only
 # 1 = in .tex only
 # 2 = no java compilation
@@ -32,12 +38,17 @@
 java_in_make := true
 else ifeq ($(do_java),1)
 java_in_tex := true
+else ifneq ($(do_java),2)
+$(error Invalid do_java, supported values are 0, 1, and 2)
 endif
 
-ifeq ($(java_in_make),true)
-java_or_not=$1
+# The xtpipes.jar is an intermediate product that is needed only when
+# java compilation is made through t4ht system call (do_java=1), not
+# when the java compilation is made in Makefile (do_java=0)
+ifeq ($(java_in_tex),true)
+xtpipe_jar = $(wd)/bin/xtpipes.jar
 else
-java_or_not=#
+xtpipe_jar = #
 endif
 
 tex_opts = --interaction=nonstopmode -recorder #--file-line-error
@@ -232,7 +243,7 @@
 derived += $(tex4ht_javahelp_derived)
 tex4ht_javahelp_derived = javahelp.4ht javahelp-a.4ht
 
-ifeq ($(java_in_make),true)
+ifneq ($(do_java),2)
 derived += $(tex4ht_javahelp_xtpipes_derived)
 tex4ht_javahelp_xtpipes_derived = javahelp.4xt
 endif
@@ -240,7 +251,7 @@
 derived += $(tex4ht_jsmath_derived)
 tex4ht_jsmath_derived = jsmath.4ht html-jsmath.4ht
 
-ifeq ($(java_in_make),true)
+ifneq ($(do_java),2)
 derived += $(tex4ht_jsml_xtpipes_derived)
 tex4ht_jsml_xtpipes_derived = \
   jsml.4xt \
@@ -268,7 +279,7 @@
 derived += $(tex4ht_html5_derived)
 tex4ht_html5_derived = html5.4ht
 
-ifeq ($(java_in_make),true)
+ifneq ($(do_java),2)
 derived += $(tex4ht_oo_xtpipes_derived)
 tex4ht_oo_xtpipes_derived = \
    oo-math.4xt oo-text.4xt \
@@ -305,12 +316,12 @@
 derived += $(tex4ht_word_derived)
 tex4ht_word_derived = htmlw.4ht
 
-ifeq ($(java_in_make),true)
+ifneq ($(do_java),2)
 derived += $(tex4ht_xhtml_xtpipes_derived)
 tex4ht_xhtml_xtpipes_derived = xhtml.4xt $(wd)/src/XhtmlEmails.java
 endif
 
-ifeq ($(java_in_make),true)
+ifneq ($(do_java),2)
 derived += $(tex4ht_xhtmml_xtpipes_derived)
 tex4ht_xhtmml_xtpipes_derived = xhtmml.4xt $(wd)/src/XhtmmlUtilities.java
 endif
@@ -320,7 +331,7 @@
 
 # wripro.tex generates nothing (not literate).
 
-ifeq ($(java_in_make),true)
+ifneq ($(do_java),2)
 derived += $(xtpipes_derived)
 xtpipes_derived = \
   $(addprefix $(wd)/src/, \
@@ -335,6 +346,7 @@
   xtpipes-default.4xt \
   xtpipes-map.dtd \
   xtpipes.dtd \
+  $(xtpipes_jar)
   #
 endif
 
@@ -433,7 +445,7 @@
 $(tex4ht_jsmath_derived): tex4ht-jsmath.tex $(common)
 	htlatex $< "html,3,sections+" "" "" $(tex_1opt)
 
-$(tex4ht_jsml_xtpipes_derived): tex4ht-jsml-xtpipes.tex $(common) $(call java_or_not,$(wd)/bin/xtpipes.jar)
+$(tex4ht_jsml_xtpipes_derived): tex4ht-jsml-xtpipes.tex $(common) $(xtpipes_jar)
 	htlatex $< "xhtml,next,3" "" "" $(tex_1opt)
 
 $(tex4ht_jsml_derived): tex4ht-jsml.tex $(common)
@@ -444,7 +456,6 @@
 
 $(tex4ht_mathml_derived): tex4ht-mathml.tex $(common)
 	htlatex $< "html,3,sections+" "" "" $(tex_1opt)
-	
 
 $(tex4ht_mathplayer_derived): tex4ht-mathplayer.tex $(common)
 	htlatex $< "html,3,sections+" "" "" $(tex_1opt)
@@ -623,19 +634,10 @@
 
 # 

 # Java.
-
 ifeq ($(java_in_make),true)
-$(wd)/bin/xtpipes.jar: $(xtpipes_derived)
-	mkdir -p $(xtpipesdir)
-	find $(wd)/src -iname '*.java' -print0 \
-	| xargs -0 javac -d $(xtpipesdir) -sourcepath $(wd)/src
-	mkdir -p $(wd)/bin
-	cd $(xtpipesdir) && jar cf xtpipes.jar *
-	mv $(xtpipesdir)/xtpipes.jar $(wd)/bin
-
 .PHONY: jar
 jar: $(homedir)/$(texmf_t4ht_bin)/tex4ht.jar
-$(homedir)/$(texmf_t4ht_bin)/tex4ht.jar: $(wd)/bin/xtpipes.jar \
+$(homedir)/$(texmf_t4ht_bin)/tex4ht.jar:
 	$(tex4ht_docbook_xtpipes_derived) \
 	$(tex4ht_fonts_noncjk_derived) \
 	$(tex4ht_html_speech_xtpipes_derived) \



More information about the tex4ht-commits mailing list.