1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

11 Commits

Author SHA1 Message Date
Christophe CURIS
4665972175 Change the way the ChangeLog date is extracted for Texi2txt generated docs
When building into another directory than in the source, the hard-coded
relative path to the changelog will fail finding the file, causing an empty
date in the generated file when '@today' is used.

This patch is making sure the ChangeLog is taken in the source directory to
avoid any problem.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2019-02-22 16:21:00 +00:00
Bernhard M. Wiedemann
36879de261 texi2txt: Use ChangeLog date instead of build date
in order to make builds reproducible. See
https://reproducible-builds.org/
for why this is good.

This date call works with GNU date and BSD date. Without this patch,
/usr/share/doc/packages/WindowMaker/README.i18n will differ in the
line An alternative solution could use the $SOURCE_DATE_EPOCH
variable defined in
https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2017-12-24 11:58:20 -02:00
Christophe CURIS
2086eefb7e texi2txt: add workaround for a known bug in "mawk"
As reported by Douglas Torrance, the script that generates the plain text
documentation from the texinfo source would crash due to the cross-
references when the version of awk used is "mawk".

This is actually a known bug in mawk:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=172774

It looks like the bug have been fixed in mawk, but Debian is still
providing a broken version. To avoid problems, this patch is introducing a
workaround in the matching pattern that causes the issue every time it is
being used.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 23:29:37 +01:00
Christophe CURIS
b3ec1ac8f4 texi2txt: add support for making cross-references in the document
The texinfo format provides 3 commands @ref, @xref and @pxref to make cross
references to existing @nodes in the document; it also provides a command
@anchor to place arbitrary targets for cross-reference.

Because these will be handy for the Installation Manual that already does
some references, this patch implements the 4 commands:

 - change the '@node' command, that did nothing, to now track potential
reference points;

 - add the '@anchor' command to register a new target for x-ref;

 - implement the 3 '@*ref' commands with similar behaviour as the texinfo
format states, with support for all arguments, generating a temporary
"@x##@" pattern for the line target;

 - generate a new file (*.xrf, a sed script) at the end with the
replacement for x-ref patterns with the correct line number, and perform
a few consistency checks;

 - during the final search-and-replace used to insert the Table of Content,
include the x-ref replacement.

The current script has some limitations:
 - because we cannot know in advance the target line number for the x-ref,
we insert it with a constant size of 5 characters to avoid breaking the
justification alignment when doing the replace;

 - there is a strict order to respect between @node and @chapter/@section,
which is needed because we have to include a line offset to get it right
when using the order given in the texinfo manual.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:11 +01:00
Christophe CURIS
22e62c0637 texi2txt: add support for the @table command
The texinfo format provides a command '@table' which is useful to provide
a list of object (function, variables, options, ...) with their associated
description.

As this will be very handy for the Installation Manual, this patch
implements the command in the script.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:11 +01:00
Christophe CURIS
04de317dde texi2txt: add support for enumerated lists
The texinfo format provides a command to generate list of item which are
prefixed by an auto-incremented number or letter.

This command was not implemented but as it will be used by the Installation
Manual of Window Maker, this patch implements it, reusing much of the code
that was handling the unordered lists.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:11 +01:00
Christophe CURIS
438accb312 texi2txt: fix support embedded item lists to allow nested lists
There are some cases where it can be useful to embed a list of item into
another list; the script was almost ready to handle this case, this patch
brings the missing stuff to get it to work properly.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:11 +01:00
Christophe CURIS
2bf380cd27 txt-from-texi: remove use of the 'switch' statement for portability
This 'switch' control statement is actually a GNU extension, so it is not
portable to other awk implementations.

This patch replace them with the traditional 'if...else' sequence which
will work everywhere.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-31 17:58:46 +00:00
Christophe CURIS
5293a5ae41 txt-from-texi: fixed use of awk 'match' function to be portable
As reported by Doug Torrance, the 3rd argument to the 'match' function is
actually a GNU extension, so it breaks compatibility when run with another
version of awk, for instance mawk.

This script changes the code to stuck to the 2 arguments version which is
posix.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-31 17:58:46 +00:00
Christophe CURIS
58854cab9b txt-from-texi: add support for variables
The support for variables in the text-from-texi script is used to
automatically insert the current version of Window Maker, inherited from
the definition in the AC_INIT command, so it will be always correctly
updated without the need for hand work.

Having this version information is recommended by GNU texinfo because if
the document happens to get distributed outside a package it can help user
avoid problems.

The second use is to define a variable 'emailsupport' which contains the
email address of the development team, so we can also inherit it from the
AC_INIT setting.

The third use is for a special variable 'cctexi2txt' to differentiate
between texi2any and our script, because when using texi2any the title
page is not generated, so we need to duplicate some information in the
source, but we do not want it to appear twice in our generated doc.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
6efbb812b0 doc: create the skeleton to have a documentation for Internationalisation
The source of the documentation is in Texinfo format to have the
possibility someday to distribute in more format that just plain text;

There is a new Makefile to generate automatically the plain text file to be
distributed from the source; this doc is also generated by 'autogen.sh'
because a user would expect to find it before compiling the program, so
even before the 'configure' script have been generated, in the case he is
compiling from a git checkout;

There is a new script to generate the documentation, because from the way
we generate it we cannot assume that 'texi2any' is available  and working
on the user's computer; it is also the opportunity to generate a better
looking document (see the description at the beginning of the script);

In this commit, the documentation only contains the base skeleton, it does
not contain yet any useful content because it is worth it's own commit.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00