Index: lit/ChangeLog
===================================================================
--- lit/ChangeLog	(revision 723)
+++ lit/ChangeLog	(working copy)
@@ -1,3 +1,32 @@
+2020-06-04  Vincent Belaïche  <vincent.belaiche@biosency.com>
+
+	* xtpipes.tex: Replace absolute paths by macros from t4ht-dir.tex.
+
+	* tex4ht-xhtmml-xtpipes.tex: Replace absolute paths by macros from
+	t4ht-dir.tex.
+
+	* tex4ht-xhtml-xtpipes.tex: Replace absolute paths by macros from
+	t4ht-dir.tex.
+
+	* tex4ht-oo-xtpipes.tex:  Replace absolute paths by macros from
+	t4ht-dir.tex.
+
+	* tex4ht-jsml-xtpipes.tex: Replace absolute paths by macros from
+	t4ht-dir.tex.
+
+	* tex4ht-javahelp-xtpipes.tex: Replace absolute paths by macros
+	from t4ht-dir.tex.
+
+	* tex4ht-html-speech-xtpipes.tex: Replace absolute paths by macros
+	from t4ht-dir.tex. Ensure directory \TEXMFTEXivBIN exists.
+
+	* tex4ht-docbook-xtpipes.tex: Replace absolute paths by macros from
+	t4ht-dir.tex.
+
+	* xtpipes.tex: Replace absolute paths by macros from
+	t4ht-dir.tex. Change system calls so that javac input files are
+	streamed from find util pattern.
+
 2020-06-04 Michal Hoftich  <michal.h21@gmail.com>
 
 	* tex4ht-fonts-modern.tex: removed lot of duplicated .htf entries.
@@ -38,7 +67,7 @@
 
 	* tex4ht-4ht.tex (latex.4ht): fixed bug in tabbing environment.
 	https://tug.org/pipermail/tex4ht/2020q2/002565.html
-		
+
 2020-05-31  Vincent_Bela\"iche  <vincent.belaiche@gmail.com>
 
 	* tex4ht-dir.m4: new file, used to generate with m4:
Index: lit/tex4ht-docbook-xtpipes.tex
===================================================================
--- lit/tex4ht-docbook-xtpipes.tex	(revision 723)
+++ lit/tex4ht-docbook-xtpipes.tex	(working copy)
@@ -12,6 +12,7 @@
 
 \input{common}
 \input{tex4ht-cpright}
+\input{tex4ht-dir}
 
 
 
@@ -49,7 +50,7 @@
 \AtEndDocument{\OutputCodE\<DbUtilities.java\>}
 
 \Needs{"
-    javac DbUtilities.java -d /home/4/gurari/xtpipes.dir/. 
+    javac DbUtilities.java -d \XTPIPES
 "}
 
 \<DbUtilities.java\><<<
@@ -515,14 +516,16 @@
 
 
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/* 
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN
+     ;
+     cp \XTPIPES xtpipes/lib/* 
+        \TEXMFTEXivXTPIPES
 "}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
Index: lit/tex4ht-html-speech-xtpipes.tex
===================================================================
--- lit/tex4ht-html-speech-xtpipes.tex	(revision 723)
+++ lit/tex4ht-html-speech-xtpipes.tex	(working copy)
@@ -5,12 +5,12 @@
 % Copyright (C) 2006-2009 Eitan M. Gurari
 % Released under LPPL 1.3c+.
 % See tex4ht-cpright.tex for license text.
-
 \documentclass{article}
     \Configure{ProTex}{log,<<<>>>,title,list,`,[[]]}
 \begin{document}
 
 \input{common}
+\input{tex4ht-dir}
 \input{tex4ht-cpright}
 
 %%%%%%%%%%%%%%%%%%
@@ -148,7 +148,7 @@
 \AtEndDocument{\OutputCodE\<HtSpk.java\>}
 
 \Needs{"
-    javac HtSpk.java      -d /home/4/gurari/xtpipes.dir/. 
+    javac HtSpk.java      -d \XTPIPES . 
 "}
 
 \<HtSpk.java\><<<
@@ -2416,14 +2416,18 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/* 
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     mkdir -p \TEXMFTEXivBIN || exit -1
+     ;
+     mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN . 
+     ;
+     cp \XTPIPES lib/* 
+        \TEXMFTEXivXTPIPES .
 "}}
 
 
Index: lit/tex4ht-javahelp-xtpipes.tex
===================================================================
--- lit/tex4ht-javahelp-xtpipes.tex	(revision 723)
+++ lit/tex4ht-javahelp-xtpipes.tex	(working copy)
@@ -626,14 +626,18 @@
 
 
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/* 
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     mv tex4ht.jar \TEXMFTEXivBIN
+     ;
+     if [ ! -d \TEXMFTEXivXTPIPES\space]; then exit -1; fi
+     ;
+     cp \XTPIPES xtpipes/lib/* 
+        \TEXMFTEXivXTPIPES
 "}}
 
 \end{document}
Index: lit/tex4ht-jsml-xtpipes.tex
===================================================================
--- lit/tex4ht-jsml-xtpipes.tex	(revision 723)
+++ lit/tex4ht-jsml-xtpipes.tex	(working copy)
@@ -13,6 +13,7 @@
 
 \input{common}
 \input{tex4ht-cpright}
+\input{tex4ht-dir}
 
 %%%%%%%%%%%%%%%%%%
 \part{Script for xtpipes}
@@ -147,7 +148,7 @@
 \AtEndDocument{\OutputCodE\<HtJsml.java\>}
 
 \Needs{"
-    javac HtJsml.java -d /home/4/gurari/xtpipes.dir/.  
+    javac HtJsml.java -d \XTPIPES
 "}
 
 \<HtJsml.java\><<<
@@ -183,7 +184,7 @@
    \OutputCodE\<GroupMn.java\> 
 } 
 \Needs{"
-    javac GroupMn.java -d /home/4/gurari/xtpipes.dir/. 
+    javac GroupMn.java -d \XTPIPES
 "} 
  
 \<GroupMn.java\><<< 
@@ -792,9 +793,9 @@
    \OutputCodE\<JsmlMathBreak.java\> 
 } 
 \Needs{"
-    javac -classpath /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/tex4ht.jar
+    javac -classpath \LIB xtpipes.jar
           JsmlMathBreak.java
-          -d /home/4/gurari/xtpipes.dir/. 
+          -d \XTPIPES . 
 "} 
  
 \<JsmlMathBreak.java\><<< 
@@ -992,7 +993,7 @@
    \OutputCodE\<JsmlFilter.java\> 
 } 
 \Needs{"
-    javac JsmlFilter.java -d /home/4/gurari/xtpipes.dir/.  
+    javac JsmlFilter.java -d \XTPIPES
 "} 
  
 \<JsmlFilter.java\><<< 
@@ -3807,14 +3808,18 @@
 
 
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/* 
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN
+     ;
+     if [ ! -d \TEXMFTEXivXTPIPES\space]; then exit -1; fi
+     ;
+     cp \XTPIPES xtpipes/lib/* 
+        \TEXMFTEXivXTPIPES
 "}}
 
 
Index: lit/tex4ht-oo-xtpipes.tex
===================================================================
--- lit/tex4ht-oo-xtpipes.tex	(revision 723)
+++ lit/tex4ht-oo-xtpipes.tex	(working copy)
@@ -12,6 +12,7 @@
 
 \input{common}
 \input{tex4ht-cpright}
+\input{tex4ht-dir}
 
 
 %%%%%%%%%%%%%%%%%%
@@ -280,7 +281,7 @@
 \AtEndDocument{\OutputCodE\<OoUtilities.java\>}
 
 \Needs{"
-    javac OoUtilities.java -d /opt/cvr/gurari/xtpipes.dir/. 
+    javac OoUtilities.java -d \XTPIPES
 "}
 
 \<OoUtilities.java\><<<
@@ -1540,7 +1541,7 @@
 \AtEndDocument{\OutputCodE\<OomFilter.java\>}
 
 \Needs{"
-    javac OomFilter.java     -d /opt/cvr/gurari/xtpipes.dir/. 
+    javac OomFilter.java     -d \XTPIPES
 "}
 
 \<OomFilter.java\><<<
@@ -1605,7 +1606,7 @@
 \AtEndDocument{\OutputCodE\<OoFilter.java\>}
 
 \Needs{"
-    javac OoFilter.java      -d /opt/cvr/gurari/xtpipes.dir/. 
+    javac OoFilter.java      -d \XTPIPES
 "}
 
 \<OoFilter.java\><<<
@@ -1955,14 +1956,18 @@
 
 
 \AtEndDocument{\Needs{%
-    "cd /opt/cvr/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /opt/cvr/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /opt/cvr/gurari/xtpipes.dir/xtpipes/lib/* 
-        /opt/cvr/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN
+     ;
+     if [ ! -d \TEXMFTEXivXTPIPES\space]; then exit -1; fi
+     ;
+     cp \XTPIPES xtpipes/lib/* 
+        \TEXMFTEXivXTPIPES
 "}}
 
 \end{document}
Index: lit/tex4ht-xhtml-xtpipes.tex
===================================================================
--- lit/tex4ht-xhtml-xtpipes.tex	(revision 723)
+++ lit/tex4ht-xhtml-xtpipes.tex	(working copy)
@@ -12,6 +12,7 @@
     \input{common.tex}
 \begin{document}
 \input tex4ht-cpright.tex
+\input tex4ht-dir
 
 
 %%%%%%%%%%%%%%%%%%
@@ -90,9 +91,9 @@
    \OutputCodE\<XhtmlEmails.java\> 
 } 
 \Needs{"
-    javac -classpath /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/tex4ht.jar
+    javac -classpath \TEXMFTEXivBIN tex4ht.jar
           XhtmlEmails.java
-          -d /home/4/gurari/xtpipes.dir/. 
+          -d \XTPIPES
 "} 
  
 \<XhtmlEmails.java\><<< 
@@ -633,14 +634,20 @@
 
 
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/* 
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     if [ ! -d \TEXMFTEXivBIN\space]; then exit -1; fi
+     ;
+     mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN  
+     ;
+     if [ ! -d \TEXMFTEXivXTPIPES\space]; then exit -1; fi
+     ;
+     cp \XTPIPES xtpipes/lib/* 
+        \TEXMFTEXivXTPIPES
 "}}
 
 
Index: lit/tex4ht-xhtmml-xtpipes.tex
===================================================================
--- lit/tex4ht-xhtmml-xtpipes.tex	(revision 723)
+++ lit/tex4ht-xhtmml-xtpipes.tex	(working copy)
@@ -12,8 +12,8 @@
     \input{common.tex}
 \begin{document}
 \input tex4ht-cpright.tex
+\input tex4ht-dir
 
-
 %%%%%%%%%%%%%%%%%%
 \part{Post Processing for HTML Output Mode}
 %%%%%%%%%%%%%%%%%%
@@ -52,7 +52,9 @@
 \AtEndDocument{\OutputCodE\<XhtmmlUtilities.java\>}
 
 \Needs{"
-    javac XhtmmlUtilities.java -d /home/4/gurari/xtpipes.dir/. 
+  if [ ! -d \XTPIPES\space]; then exit 1; fi
+  ;
+  javac XhtmmlUtilities.java -d \XTPIPES
 "}
 
 \<XhtmmlUtilities.java\><<<
@@ -722,14 +724,21 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;  
      jar cf tex4ht.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/. 
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/* 
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     if [ ! -d \TEXMFTEXivBIN\space]; then exit -1; fi
+     ;
+     mv \XTPIPES tex4ht.jar \TEXMFTEXivBIN
+     ;
+     if [ ! -d \TEXMFTEXivXTPIPES\space]; then exit -1; fi
+     ;
+     cp \XTPIPES  xtpipes/lib/* 
+     \TEXMFTEXivXTPIPES
+     ;
 "}}
 
 
Index: lit/xtpipes.tex
===================================================================
--- lit/xtpipes.tex	(revision 723)
+++ lit/xtpipes.tex	(working copy)
@@ -21,6 +21,7 @@
    \Configure{ProTex}{java,<<<>>>,title,list,`}
 \begin{document}
 \input tex4ht-cpright.tex
+\input tex4ht-dir.tex
 
 \def\CNT{0}
 \bgroup
@@ -176,10 +177,10 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+% TODO : make \WORK MSDOS / Linux agnostic.
+\def\MYdir{\WORK}
 
-\def\MYdir{work.dir}
 
-
 \expandafter\let\csname !/\endcsname\empty
 \expandafter\let\csname !/\endcsname\empty
 \expandafter\let\csname !/home\endcsname\empty
@@ -229,16 +230,9 @@
 
 \ifOption{win} {}{
 \AtEndDocument{\Needs{"
-  cd work.dir
-  ;
-  javac -Xlint:unchecked xtpipes/*.java
-        -d /home/4/gurari/xtpipes.dir/.
-  ;
-  javac -Xlint:unchecked xtpipes/*/*.java
-        -d /home/4/gurari/xtpipes.dir/.
-  ;
-  javac -Xlint:unchecked xtpipes.java
-        -d /home/4/gurari/xtpipes.dir/.
+    find \WORK\space -type f -iname '*.java' -print0
+    | xargs -0 javac -Xlint:deprecation -d \XTPIPES\space --source-path \WORK
+    ;
 "}}
 }
 
@@ -246,7 +240,7 @@
 \ifOption{win} {
     \def\BIN{}
 }{
-    \def\BIN{(/home/4/gurari/xtpipes.dir)}
+    \def\BIN{(\XTPIPES)}
 }
 
 % 
@@ -279,7 +273,7 @@
 `<class XtpipesEntityResolver`>
 >>>
 
-\Needs{"\mv xtpipes.java.java \MYdir\Slash xtpipes.java"}
+\Needs{"\mv xtpipes.java.java \MYdir xtpipes.java"}
 
 NOTE: We can not place Xtpipes.class and xtpipes.class at the same
 directory because MS Windows get confused between the two.
@@ -4478,14 +4472,20 @@
 
 \ifOption{win} {}{
 \AtEndDocument{\Needs{%
-    "cd /home/4/gurari/xtpipes.dir
+    "pushd \XTPIPES || exit 1
      ;
-     jar cf tex4ht.jar *
+     jar cf xtpipes.jar *
      ;
-     mv tex4ht.jar /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/.
+     popd
      ;
-     cp /home/4/gurari/xtpipes.dir/xtpipes/lib/*
-        /home/4/gurari/tex4ht.dir/texmf/tex4ht/xtpipes/.
+     mkdir -p \LIB || exit 1
+     ;
+     mv \XTPIPES xtpipes.jar \LIB
+     ;
+     mkdir -p \HOME texmf/tex4ht/xtpipes/. || exit 1
+     ;
+     cp \XTPIPES xtpipes/lib/*
+        \HOME texmf/tex4ht/xtpipes/.
 "}}
 }
 
@@ -4492,25 +4492,20 @@
 
 
 \ifOption{win} {}{
-\AtEndDocument{\Needs{"
-cd work.dir ;
-mkdir bin;
- javac -Xlint:unchecked  -d bin  xtpipes/*.java  ;
- javac -Xlint:unchecked  -d bin  xtpipes/util/*.java;
- javac -Xlint:unchecked  -d bin  *.java ;
-cd bin;
- jar cf xtpipes.jar *;
-cd ..;
-cd xtpipes;
-mkdir bin;
- mv ../bin/xtpipes.jar bin/.
-;
-cp -r bin /home/4/gurari/xtpipes.dir/xtpipes/.
-;
-cd ..
-;
-cd ..
-;
+  \AtEndDocument{\Needs{"
+      mkdir -p \LIB\space || exit 1
+      ;
+      find \WORK\space -type f -iname '*.java' -print0
+      | xargs -0 javac -Xlint:deprecation -d \XTPIPES\space --source-path \WORK
+      ;
+      pushd \XTPIPES || exit 1
+      ;
+      jar cf xtpipes.jar *
+      ;
+      popd
+      ;
+      mv \XTPIPES xtpipes.jar \LIB
+      ;
 "}}}
 
 
