[latexrefman-commits] [SCM] latexrefman updated: r566 - trunk

vincentb1 at gnu.org.ua vincentb1 at gnu.org.ua
Thu Jul 27 11:59:39 CEST 2017


Author: vincentb1
Date: 2017-07-27 12:59:39 +0300 (Thu, 27 Jul 2017)
New Revision: 566

Modified:
   trunk/ChangeLog
   trunk/Makefile.1
Log:
Add automated node list comparison.

* Makefile.1 (compare-nodes, compare-nodes-fr, compare-nodes-es):
new targets to compare node lists between languages. compare-nodes
is made a synonym of compare-nodes-fr because the Spanish
translation does not reuse the same node names.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2017-07-26 20:39:09 UTC (rev 565)
+++ trunk/ChangeLog	2017-07-27 09:59:39 UTC (rev 566)
@@ -1,3 +1,11 @@
+2017-07-27  Vincent Belaïche  <vincentb1 at users.sourceforge.net>
+
+	* Makefile.1 (compare-nodes, compare-nodes-fr, compare-nodes-es):
+	new targets to compare node lists between languages. compare-nodes
+	is made a synonym of compare-nodes-fr because the Spanish
+	translation does not reuse the same node names.
+
+
 2017-07-26  Vincent Belaïche  <vincentb1 at users.sourceforge.net>
 
 	* latex2e-fr.texi (<header comment>): Add reference to

Modified: trunk/Makefile.1
===================================================================
--- trunk/Makefile.1	2017-07-26 20:39:09 UTC (rev 565)
+++ trunk/Makefile.1	2017-07-27 09:59:39 UTC (rev 566)
@@ -212,6 +212,7 @@
 .PHONY: distclean clean mostlyclean
 distclean clean mostlyclean:
 	rm -rf $(manual)*.t2* license.texi
+	rm -f $(patsubst %,node-list-%.txt,$(languages))
 
 .PHONY: realclean maintainer-clean
 realclean maintainer-clean: distclean
@@ -342,11 +343,44 @@
 
 # Convenience targets to svn revert the generated files,
 # and svn diff the source files.
+.PHONY: svr svd
 svr:
 	svn revert $(addprefix $(manual)*., $(all_suffixes))
 svd:
 	svn diff $(foreach lang,$(languages),$(call txt_files,$(lang))) $(patsubst %,aspell.%.pws,$(languages)) *.texi
 
+
+# Target for comparing node lists between languages
+# use target compare-nodes-fr to compare French & English together.
+.PHONY: compare-nodes
+#compare-nodes: $(addprefix compare-nodes-,$(other_languages))
+# For the time being we compare only French/English as the Spanish
+# translation does not reuse the same node names
+compare-nodes: compare-nodes-fr
+
+define _1
+.PHONY: compare-nodes-$(1)
+compare-nodes-$(1): node-list-$(1).txt node-list-$(default_language).txt 
+	if diff $$^; then :; \
+	else echo "=================================="; \
+	  echo "Node list between $(1) and $(default_language) differ"; \
+	  echo "=================================="; \
+	fi
+
+endef
+$(eval $(foreach LANG,$(other_languages),$(call _1,$(LANG))))
+
+define AWK_NODE_LIST
+/^ *@node/ { gsub(/^ *@node +| *,.*$$$$/,""); print; }
+endef
+
+define _1
+node-list-$(1).txt: $($(1)_manual).texi
+	awk '$(AWK_NODE_LIST)' $$< > $$@
+
+endef
+$(eval $(foreach LANG,$(languages),$(call _1,$(LANG))))
+
 # Local Variables:
 # coding: utf-8
 # mode: makefile



More information about the latexrefman-commits mailing list