[tex4ht-commits] [SCM] tex4ht updated: r1061 - in trunk/lit: . archive

Karl Berry INVALID.NOREPLY at gnu.org.ua
Thu Jan 20 23:17:17 CET 2022


Author: karl
Date: 2022-01-20 22:17:17 +0000 (Thu, 20 Jan 2022)
New Revision: 1061

Added:
   trunk/lit/archive/htfonts.mk
   trunk/lit/update-htfonts
Modified:
   trunk/lit/ChangeLog
   trunk/lit/Makefile
Log:
update-htfonts script to compare/update .htf tree

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-01-20 16:53:49 UTC (rev 1060)
+++ trunk/lit/ChangeLog	2022-01-20 22:17:17 UTC (rev 1061)
@@ -1,3 +1,12 @@
+2022-01-20  Karl Berry  <karl at freefriends.org>
+
+	* update-htfonts: new script to compare/update htfonts from
+	dev to the installed (TL) tree.
+	* Makefile (diff-htfonts): just run the new script.
+	(update-htfonts): new target to run the script.
+	(diff-all): also depend on diff-src and diff-htfonts.
+	(update-all-fonts): new target to rerun all the *-fonts-*.tex files.
+
 2022-01-20  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html5.tex (html5.4ht): add space after caption label.

Modified: trunk/lit/Makefile
===================================================================
--- trunk/lit/Makefile	2022-01-20 16:53:49 UTC (rev 1060)
+++ trunk/lit/Makefile	2022-01-20 22:17:17 UTC (rev 1061)
@@ -13,12 +13,8 @@
 PATH := $(shell echo $$PATH)
 #
 # per-user addition to PATH. We need to use LaTeX out of current TeX Live,
-# since changes that affect tex4ht are often made. Include trailing :.
-ifeq ($(USER),karl)
-user_bin := /usr/local/texlive/dev/bin/x86_64-linux:
-else
+# since changes that affect tex4ht are often made. If set, include trailing :.
 user_bin :=
-endif
 #
 export PATH := $(ht_bin):$(extra_bin):$(user_bin)$(PATH)
 
@@ -32,14 +28,15 @@
 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
+#
+# do_java=1 works only if tex4ht-dir.tex is not already built with
+#           the do_java=0 option.
+# 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
 do_java ?= 2
 java_in_make := false
 java_in_tex := false
@@ -560,6 +557,20 @@
 # (corresponds to src/java for xtpipes.tex)
 
 # 

+# Remake all *-fonts-*.tex files, i.e., update all htf. Since we list
+# few dependencies for these, have to have some other way. Assume GNU make.
+# Takes ~20 min and generates ~50MB of output.
+update-all-fonts:
+	date; for f in *-fonts-*.tex; do \
+	  printf "\n\f making $$f"; \
+	  $(MAKE) -W $$f || exit $?; done
+	@echo "update-all-fonts done."
+
+# Simple make abbrev for convenience.
+upmake upm:
+	svn update && make
+
+# 

 # Test installation. Does not work.
 destdir = update.dir
 dest_texmf = $(destdir)/texmf/tex/generic/tex4ht
@@ -705,7 +716,7 @@
 inst_dir_4ht = $(texmf)/tex/generic/tex4ht
 inst_dir_top = $(texmf)/tex4ht
 inst_dir_scripts = $(texmf)/scripts/tex4ht
-inst_dir_source = $(texmf)/source/tex4ht
+inst_dir_source = $(texmf)/source/generic/tex4ht
 
 # Simple command to "install" from dev to TL.
 # (Other methods are also used.)
@@ -754,40 +765,19 @@
 
 # 

 # Checking and updating font support files.
-# 
+
+# Where they are in the installed tree.
 ht_fonts_instdir = $(inst_dir_top)/ht-fonts
-#
-install-unicode-4hf:
-	cd $(ht_fonts_devdir) && tar cf - `find . -name unicode.4hf` \
-	| (cd $(ht_fonts_instdir) && tar xf -)
-	svn diff $(ht_fonts_instdir)
-#
-# copy fonts listed in /tmp/htf (must be filenames relative to
-# ht_fonts_devdir, like those created by diff-htfonts below)
-# to ht_fonts_instdir.  Or to use /tmp/htnew instead of /tmp/htf, override:
-tmp_htf = /tmp/htf
-install-htfonts-tmp:
-	cd $(ht_fonts_devdir) && tar cfT - $(tmp_htf) \
-	| (cd $(ht_fonts_instdir) && tar xvf -)
-	svn status $(ht_fonts_instdir)
 
+# Compare only.
 diff-htfonts:
-# put the raw diff in /tmp/htd:
-	-$(diff) -r $(ht_fonts_instdir) $(ht_fonts_devdir) >/tmp/htd
-# just the changed filenames in /tmp/htf; but this includes date changes,
-#   so will have lots of false matches. must fixx ...
-# also we don't ever remove $(ht_fonts_instdir), so old stuff stays
-#   around; must fixx again.
-	sed -n 's,^diff.*ht-fonts/,,p' /tmp/htd | sort >/tmp/htf
-# and new filenames in /tmp/htnew:
-	sed -n -e 's,^Only in.*ht-fonts/,,' \
-	       -e 's,: ,/,p' /tmp/htd >/tmp/htnew
-# for human consumption, remove generation lines (hopefully there are no
-# real diffs on those lines); also the @@ lines from diff -u and the
-# redundant diff invocations.
-	egrep -v '^(diff |@@ |[-+][^-+].*20[0-9][0-9]-[0-9][0-9]-[0-9][0-9])' \
-	/tmp/htd | tee /tmp/htchanges
+	./update-htfonts diff $(ht_fonts_devdir) $(ht_fonts_instdir) | tee /tmp/htdif
 
+# Compare and update.
+update-htfonts:
+	./update-htfonts update $(ht_fonts_devdir) $(ht_fonts_instdir) | tee /tmp/htdif
+.PHONY: update-htfonts
+
 # 

 # diff all files in the main TeX Live installation directory against
 # cwd (development). the --ignore-matching-lines below only works when
@@ -798,7 +788,7 @@
 # 
 # The diff-scripts output is usually empty, so we can run that;
 # but diff-htfonts is too verbose to run every time.
-diff-all: diff-scripts #diff-htfonts
+diff-all: diff-src diff-scripts diff-htfonts
 	@echo; echo '>>> $@'
 	-for f in $(inst_dir_4ht)/*; do $(diff) $$f .; done \
 	| tee /tmp/u | egrep -v '^ *[-+]%|^@@ |^- *$$|-1.version' \
@@ -852,7 +842,3 @@
 croncheck: diff-all \
 	   inst-check-copyright inst-check-files inst-check-version \
 	   diff-htfonts
-	
-# final simple abbrev for convenience.
-upmake upm:
-	svn update && make

Index: trunk/lit/archive/htfonts.mk
===================================================================
--- trunk/lit/archive/htfonts.mk	2022-01-20 16:53:49 UTC (rev 1060)
+++ trunk/lit/archive/htfonts.mk	2022-01-20 22:17:17 UTC (rev 1061)

Property changes on: trunk/lit/archive/htfonts.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: trunk/lit/update-htfonts
===================================================================
--- trunk/lit/update-htfonts	2022-01-20 16:53:49 UTC (rev 1060)
+++ trunk/lit/update-htfonts	2022-01-20 22:17:17 UTC (rev 1061)

Property changes on: trunk/lit/update-htfonts
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property


More information about the tex4ht-commits mailing list.