[latexrefman-commits] r522 - in /trunk: ChangeLog Makefile.1 aspell.es.pws aspell.fr.pws latex2e-fr.texi
vincent.b.1 at domain.hid
vincent.b.1 at domain.hid
Thu Apr 7 23:21:04 CEST 2016
Author: vincentb1
Date: Thu Apr 7 23:21:03 2016
New Revision: 522
URL: http://svn.gna.org/viewcvs/latexrefman?rev=522&view=rev
Log:
* latex2e-fr.texi: Updated @set UPDATED.
* aspell.es.pws: new file.
* aspell.fr.pws: new file.
* Makefile.1: new file evolved from Makefile, to be merged
later-on with Makefile once Karl has more time to review it and
validate the design. Compared to orignal Makefile the changes are
as follows, where xx denotes the language, ie is a two letter word
in {en,fr,es}:
- make it futureproof w.r.t. to new languages addition.
- make it safer:
- test for uncommitted changes before preparing distribution zip
- automate @set UPDATED flag before preparing distribution zip
- add target dist-xx, to prepare distribution for language xx only, this
triggers automatic update of @set UPDATED flag for the corresponding
language
- modify spell and spell-en target so as to support all languages. I had
to add custom dicitionnary for fr and es. spell will check all the
languages, use spell-en for English only. My aspell seems to be too
old to support --mode=texinfo, so I could not test it.
- modify target dist so that french is added to the zip file. Please
note that dist will not trigger automatic update of the @set UPDATED
flag, before Makefile cannot know which manual has been updated and
which not. This will also make the uncommitted check.
- add target updated-date-xx to automatically update @set UPDATED flag
in the xx manual
- add target updated-xx to do updated-date-xx + rebuild all outputs for
xx
- add target tag to make a tag, you can use this as follows for default
CTAN tag (which is `ctanYYYY-MM-DDTHH:mm:SS', where
YYYY-MM-DDTHH:mm:SS is an ISO time stamp):
make tag
or you can do this for make tag `foo' with message `Some message':
make tag TAG=foo "MESSAGE=Some message"
Added:
trunk/Makefile.1
trunk/aspell.es.pws
trunk/aspell.fr.pws
Modified:
trunk/ChangeLog
trunk/latex2e-fr.texi
Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=522&r1=521&r2=522&view=diff
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Thu Apr 7 23:21:03 2016
@@ -1,3 +1,54 @@
+2016-04-07 Vincent Belaïche <vincentb1 at domain.hid>
+
+ * latex2e-fr.texi: Updated @set UPDATED.
+
+ * aspell.es.pws: new file.
+
+ * aspell.fr.pws: new file.
+
+ * Makefile.1: new file evolved from Makefile, to be merged
+ later-on with Makefile once Karl has more time to review it and
+ validate the design. Compared to orignal Makefile the changes are
+ as follows, where xx denotes the language, ie is a two letter word
+ in {en,fr,es}:
+
+ - make it futureproof w.r.t. to new languages addition.
+
+ - make it safer:
+ - test for uncommitted changes before preparing distribution zip
+ - automate @set UPDATED flag before preparing distribution zip
+
+ - add target dist-xx, to prepare distribution for language xx only, this
+ triggers automatic update of @set UPDATED flag for the corresponding
+ language
+
+ - modify spell and spell-en target so as to support all languages. I had
+ to add custom dicitionnary for fr and es. spell will check all the
+ languages, use spell-en for English only. My aspell seems to be too
+ old to support --mode=texinfo, so I could not test it.
+
+ - modify target dist so that french is added to the zip file. Please
+ note that dist will not trigger automatic update of the @set UPDATED
+ flag, before Makefile cannot know which manual has been updated and
+ which not. This will also make the uncommitted check.
+
+ - add target updated-date-xx to automatically update @set UPDATED flag
+ in the xx manual
+
+ - add target updated-xx to do updated-date-xx + rebuild all outputs for
+ xx
+
+ - add target tag to make a tag, you can use this as follows for default
+ CTAN tag (which is `ctanYYYY-MM-DDTHH:mm:SS', where
+ YYYY-MM-DDTHH:mm:SS is an ISO time stamp):
+
+ make tag
+
+ or you can do this for make tag `foo' with message `Some message':
+
+ make tag TAG=foo "MESSAGE=Some message"
+
+
2016-04-04 Vincent Belaïche <vincentb1 at domain.hid>
* latex2e.texi: Add EnvIndex macro to make indexing environments
Added: trunk/Makefile.1
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/Makefile.1?rev=522&view=auto
==============================================================================
--- trunk/Makefile.1 (added)
+++ trunk/Makefile.1 Thu Apr 7 23:21:03 2016
@@ -0,0 +1,313 @@
+# $Id: Makefile 466 2015-10-27 11:31:20Z jhefferon $
+# Public domain. Originally written 2006, Karl Berry.
+# Makefile for latexrefman.
+
+# Adding a new langage xx (for instance xx is ru for Russian) is as
+# follows:
+# 1) add xx to the list in other_languages
+# 2) add definition of xx_longname, for instance if xx is ru,
+# xx_longname:=russian
+# 3) add definition of xx_updated_awk, script for formatting @set
+# UPDATED tag.
+
+manual=latex2e
+default_language=en
+other_languages=fr es
+languages=$(default_language) $(other_languages)
+
+#
+xref_suffixes := ky cp vr fn cp pg tp
+xref_suffixes := $(xref_suffixes) $(addsuffix s,$(xref_suffixes))
+xref_suffixes := aux log toc $(xref_suffixes)
+tex_suffixes = dvi pdf
+makeinfo_suffixes = dbk html info txt xml
+en_longname:=english
+es_longname:=spanish
+fr_longname:=french
+
+define lang_template
+dist-$(1):=$(manual)-help-texinfo-$(1)
+$(1)_manual:=$$(subst -$(default_language),,$(manual)-$(1))
+$(1)_tex_output := $$(addprefix $$($(1)_manual).,$(tex_suffixes))
+$(1)_makeinfo_output := $$(addprefix $$($(1)_manual).,$(makeinfo_suffixes))
+$(1)_output := $$($(1)_tex_output) $$($(1)_makeinfo_output)
+tex_output+= $$($(1)_tex_output)
+makeinfo_output+= $$($(1)_makeinfo_output)
+endef
+$(foreach lang,$(languages), $(eval $(call lang_template,$(lang))))
+
+#
+all_suffixes = dvi pdf $(makeinfo_suffixes)
+
+
+#
how to build.
+#
+texi2dvi = texi2dvi --batch --tidy --build-dir=$*.t2dvi
+texi2pdf = texi2pdf --batch --tidy --build-dir=$*.t2pdf
+#
+makeinfo = makeinfo
+texi2docbook = $(makeinfo) --docbook
+texi2html = $(makeinfo) --html --no-split $(texi2html_top)
+texi2info = $(makeinfo) --no-split
+texi2txt = $(makeinfo) --plaintext --no-split
+texi2xml = $(makeinfo) --xml
+#
+# Go somewhere useful from Top.
+texi2html_top = -c TOP_NODE_UP_URL=http://tug.org/texinfohtml/
+
+%.pdf: %.texi
+ $(texi2pdf) $<
+%.dvi: %.texi
+ $(texi2dvi) $<
+#
+%.dbk: %.texi
+ $(texi2docbook) -o $@ $<
+%.html: %.texi
+ $(texi2html) $<
+
+%/index.html: %.texi
+ $(makeinfo) --html $(texi2html_top) $<
+
+%.info: %.texi
+ $(texi2info) $<
+%.txt: %.texi
+ $(texi2txt) -o $@ $<
+%.xml: %.texi
+ $(texi2xml) $<
+
+
+#
targets follow.
+#
+default: check-en
+
+# to test changes, build a subset: html and info (since these formats
+# exercise significantly different code paths), and pdf for tex.
+check_suffixes = html info pdf
+#
+.PHONY: check
+check: $(addprefix check-,$(languages))
+define lang_template
+.PHONY:check-$(1)
+check-$(1): spell-$(lang) $(addprefix $($(1)_manual), $(check_suffixes))
+endef
+$(foreach lang,$(languages), $(eval $(call lang_template,$(lang))))
+
+
+
+# Build per language.
+define lang_template
+.PHONY: $(1)
+$(1): $($(lang)_output)
+endef
+$(foreach lang,$(languages), $(eval $(call lang_template,$(lang))))
+
+
+# Build per language with UPDATED flag refresh setttig LC_TIME to fr
+# or es does not change the format %B under MSYS, neither with awk
+# time function, nor with date bash command. This is why we emulate
+# this.
+define fr_updated_awk
+function updated(){\
+ monthes[1]="Janvier";\
+ monthes[2]="Février";\
+ monthes[3]="Mars";\
+ monthes[4]="Avril";\
+ monthes[5]="Mai";\
+ monthes[6]="Juin";\
+ monthes[7]="Juillet";\
+ monthes[8]="Août";\
+ monthes[9]="Septembre";\
+ monthes[10]="Octobre";\
+ monthes[11]="Novembre";\
+ monthes[12]="Décembre";\
+ return monthes[month] " " year;\
+}
+endef
+define en_updated_awk
+function updated(){\
+ return strftime("%B %Y",time_stamp);\
+}
+endef
+define es_updated_awk
+function updated(){\
+ monthes[1] = "Enero";\
+ monthes[2] = "Febrero";\
+ monthes[3] = "Marzo";\
+ monthes[4] = "Abril";\
+ monthes[5] = "Mayo";\
+ monthes[6] = "Junio";\
+ monthes[7] = "Julio";\
+ monthes[8] = "Agosto";\
+ monthes[09] = "Septiembre";\
+ monthes[10] = "Octubre";\
+ monthes[11] = "Noviembre";\
+ monthes[12] = "Diciembre";\
+ return monthes[month] " " year;\
+}
+endef
+define set_updated_awk
+$($(1)_updated_awk);\
+BEGIN { time_stamp=systime();\
+ year=strftime("%Y",time_stamp);\
+ month=strftime("%m",time_stamp) + 0;\
+ };\
+/^ *@set +UPDATED/ { the_func="updated_" lang;\
+ $$$$0="@set UPDATED " updated();};\
+ { print}
+endef
+define lang_template
+.PHONY: updated-$(1)
+updated-date-$(1):
+ LC_TIME=C; \
+ awk -v lang=$(1) '$(call set_updated_awk,$(1))' $($(1)_manual).texi > temp.texi; \
+ if diff $($(1)_manual).texi temp.texi > /dev/null; then \
+ rm temp.texi; \
+ else \
+ mv temp.texi $($(1)_manual).texi; \
+ fi
+
+updated-$(1): updated-date-$(1)
+ $$(MAKE) $(1)
+endef
+$(foreach lang,$(languages), $(eval $(call lang_template,$(lang))))
+
+
+# To build everything in all languages.
+.PHONY: all
+all: $(languages)
+
+# following the GNU sequence of clean targets.
+.PHONY: distclean clean mostlyclean
+distclean clean mostlyclean:
+ rm -rf $(manual)*.t2*
+
+.PHONY: realclean maintainer-clean
+realclean maintainer-clean: distclean
+ rm -f $(addprefix $(manual)*., $(tex_suffixes) $(makeinfo_suffixes) $(xref_suffixes))
+ rm -fr $(foreach lang,$(addprefix dist-,$(languages)),$($(lang)) $($(lang)).zip)
+ rm -fr $(manual)-help-texinfo $(manual)-help-texinfo.zip
+
+
+#
dist for CTAN. Also update NEWS
+#
+txt_files = ChangeLog Makefile.1 NEWS README ltx-help.el
+
+define dist_output
+$($(1)_makeinfo_output) $(addprefix $($(1)_manual).,pdf texi) aspell.$(1).pws
+endef
+
+define make_dist_dir
+mkdir -p $(1); \
+cd $(1); \
+$(foreach file,$(call dist_output,$(2)) $(4), \
+ ln -s $(3)/$(file) $(subst Makefile.1,Makefile,$(file));) \
+cd $(3);
+endef
+
+# Distribution per language.
+define lang_template
+.PHONY: dist-$(1)
+dist-$(1): updated-$(1)
+ @if svn status $(call dist_output,$(1)) $(txt_files) \
+ && test -z "$(DIST_FORCE)"; \
+ then \
+ echo "There are uncommited changes."; \
+ echo "Commit them before making the distribution zip..."; \
+ echo "or make again with DIST_FORCE=1."; \
+ exit 2; \
+ fi
+ rm -fr $(dist-$(1))
+ $(call make_dist_dir,$(dist-$(1)),$(1),..,$(txt_files))
+ -zip -qr $(dist-$(1)).zip $(dist-$(1))
+ rm -fr $(dist-$(1))
+ @ls -l $(dist-$(1)).zip; unzip -t $(dist-$(1)).zip
+endef
+$(foreach lang,$(languages), $(eval $(call lang_template,$(lang))))
+
+
+
+dist = $(manual)-help-texinfo
+#
+.PHONY: dist
+dist: all
+ @if svn status $(foreach lang,$(languages),$(call dist_output,$(lang))) $(txt_files) \
+ && test -z "$(DIST_FORCE)"; \
+ then \
+ echo "There are uncommited changes."; \
+ echo "Commit them before making the distribution zip..."; \
+ echo "or make again with DIST_FORCE=1."; \
+ exit 2; \
+ fi
+ rm -fr $(dist)
+ $(call make_dist_dir,$(dist),$(default_language),..,$(txt_files))
+ $(foreach lang,$(other_languages), \
+ $(call make_dist_dir,$(dist)/$($(lang)_longname),$(lang),../..,))
+ -zip -qr $(dist).zip $(dist)
+ rm -fr $(dist)
+ @ls -l $(dist).zip; unzip -t $(dist)
+
+
+
+# A hacky spell check target.
+# Remove \commandnames to reduce exception list, but not {args} or
+# [args], since they are often words.
+.PHONY: spell
+spell: $(addprefix spell-,$(languages))
+define lang_template
+.PHONY: spell-$(1)
+spell-$(1):
+ sed -e 's/\\[a-zA-z]*//g' $($(1)_manual).texi \
+ | aspell list --mode=texinfo --add-extra-dicts=`pwd`/aspell.$(1).pws \
+ | sort -f -u
+endef
+$(foreach lang,$(languages), $(eval $(call lang_template,$(lang))))
+
+# Check for doubled words.
+# http://www.math.utah.edu/~beebe/software/file-tools.html#dw
+check-dw:
+ grep -v '^@item' $(manual).texi | dw
+
+# Convenience target to tag a delivery to CTAN
+GNA_USERID&=vincentb1
+TAG?=ctan$(VERSION)
+MESSAGE?=Delivery to CTAN $(VERSION)
+CTANTAG?=svn copy svn+ssh://$(GNA_USERID)@svn.gna.org/svn/latexrefman/trunk svn+ssh://$(GNA_USERID)@svn.gna.org/svn/latexrefman/tags/$(TAG) -m "$(MESSAGE)"
+.PHONY: tag
+tag:
+ifeq ($(GNA_USERID),)
+ echo 'Please define GNA_USERID variable in your environment to your GNA! user id'
+ exit -1
+else ifeq ($(TAG),ctan)
+ @if test -z '$(GNA_USERID)'; then \
+ echo 'Please define GNA_USERID variable in your environment to your GNA! user id'; \
+ exit -1; \
+ else \
+ $(MAKE) $@ "VERSION=$(shell date '+%Y-%m-%dT%T')"; \
+ fi
+else
+ @echo 'Will you run the following command:'
+ @echo '$(CTANTAG)'
+ @select w in yes no; \
+ do \
+ case $$w in \
+ yes) \
+ $(CTANTAG); \
+ break;; \
+ no) \
+ echo 'Cancelled'; \
+ break;; \
+ esac; \
+ done
+endif
+
+# Convenience targets to svn revert the generated files,
+# and svn diff the source files.
+svr:
+ svn revert $(addprefix $(manual)*., $(all_suffixes))
+svd:
+ svn diff $(txt_files) $(patsubst %,aspell.%.pws,$(languages)) *.texi
+
+# Local Variables:
+# coding: utf-8
+# mode: makefile
+# End:
Added: trunk/aspell.es.pws
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/aspell.es.pws?rev=522&view=auto
==============================================================================
--- trunk/aspell.es.pws (added)
+++ trunk/aspell.es.pws Thu Apr 7 23:21:03 2016
@@ -0,0 +1 @@
+personal_ws-1.1 es 0
Added: trunk/aspell.fr.pws
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/aspell.fr.pws?rev=522&view=auto
==============================================================================
--- trunk/aspell.fr.pws (added)
+++ trunk/aspell.fr.pws Thu Apr 7 23:21:03 2016
@@ -0,0 +1,3 @@
+personal_ws-1.1 en 0
+esperluette
+perluète
Modified: trunk/latex2e-fr.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e-fr.texi?rev=522&r1=521&r2=522&view=diff
==============================================================================
--- trunk/latex2e-fr.texi (original)
+++ trunk/latex2e-fr.texi Thu Apr 7 23:21:03 2016
@@ -4,7 +4,7 @@
@setfilename latex2e-fr.info
@documentlanguage fr
@documentencoding UTF-8
- at domain.hid UPDATED Mars 2016
+ at set UPDATED Avril 2016
@settitle manuel de référence de @LaTeX{}2e (@value{UPDATED})
@comment % ** fin de tête (c'est pour courir Texinfo sur une région.)
@clear HAS-MATH
More information about the latexrefman-commits
mailing list