1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 03:50:30 +01:00

23 Commits

Author SHA1 Message Date
Christophe CURIS
6afa419b01 Website: Create script to update the list of man pages in the index
It is a good idea to have an Index web page with the list of the man pages
available, but there is a risk to have it outdated, so there is a script to
take care of this for us.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-06-20 22:28:19 +01:00
Christophe CURIS
a2bf67f54c Website: Create script to generate the HTML version of the man pages
When running the 'make website' command, it will call groff to convert the
man pages into HTML and post-process them to get them in the style of the
site, then place them in the Website Git Repository.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-06-20 22:28:19 +01:00
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
fa5f8d9937 wmaker-check: rewrote parsing of structure fields for callback checker
Doug Torrance reported a problem with some versions of AWK which caused the
signed/unsigned attribute to not be properly ignored, because the regular
expression was using a GNU extension to keep it simple.

While trying to reproduce it, I discovered that mawk was chocking on one
regexp used in parsing the type+names parsing of structure members.

This patch is rewriting the parsing, because hacking regexp to make them
fall working is still not the best solution for maintainability. There is
now a clearer code which is also safer because it will handle more
gracefully corner cases.

Reported-by: Doug Torrance <dtorrance@monmouthcollege.edu>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-15 17:44:50 +01:00
Christophe CURIS
ba3e575971 wmaker: add script to check the call-back function used when loading configuration
Because the C compiler cannot check the consistency between the type of the
variable being pointed to, and the type expected by the call-back function
that is used to parse and store the value from the configuration file,
there is a risk of mismatch that can cause Window Maker to misbehave due to
data corruption, which depends strongly on the configuration values and the
architecture on which Window Maker is running.

This patch introduces a script that checks the consistency where possible, to
raise the issues when performing "make check".

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-08 18:53:29 +01: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
30fe0fb05f check-doc: add an option to ignore some explicit options from the command's help
There are a few rare cases where some options listed in the program's
built-in help page may not be documented for a valid reason. This patch
provides an option to the checking script to not complain about them, but:

 - the listed options must include a comment about why, to ensure that the
user thinks twice about it and because it is better for maintainability;

 - the listed option must be part of the options listed by the application
to ensure the command line invocation of the script will remain up to date.

This new option is then used for the check of the "configure" options
because for a few of them the right place to document them is in the
INSTALL file provided by Autoconf and not in our Window Maker specific doc.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 23:29:37 +01:00
Christophe CURIS
0c09d1f40d check the "configure" option list against the INSTALL-WMAKER documentation
In order to ease the job of keeping the documentation aligned against the
sources, this patch adds a check of the list of options returned by
"configure --help" against the options that are listed in the
INSTALL-WMAKER file.

The check is ran as part of "make check", which also implies it will break
a "make distcheck" operation when not in line.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:11 +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
d3414d335f wmaker: create script to handle conditional and variables replacement in man pages
Because the man page references some stuff that are dependant on the
configure options, it is a good idea to update the man page accordingly, so
the user will not be puzzled later.

There is now a script which takes care of replacing '@var@' in the same way
autoconf does, but also which can handle conditional '@def@' removal (for
the case of feature dependant command line options).

The man page for Window Maker is now processed this way so user will always
see accurate information.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:10 +01:00
Christophe CURIS
b6270f5a92 wmaker: created script to check program's options against documentation
In order to ease the job of keeping the documentations up to date, there is
a new script 'check-cmdline-options' that checks a program's options (with
the '--help' option) and compare them with its documentation (the manual
page) to make sure everything is aligned.

This is triggered with "make check" for wmaker.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:10 +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
a9a0d2ac85 make: new target 'update-lang' to update the PO files for a languages against latest sources
With the new target, it is now easy to update all translations in the
project for a language against latest code with the simple command, run
from the top directory:

  make update-lang PO=<lang>

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +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
Christophe CURIS
b266808331 created script to check the list of source files to handle for translation
Because the source file is redefined in the 'po/' directories, there is a
possibility that they get misaligned.

There is now a script that will check everything is in line; it is
triggered by "make check".

The case of the "util/" stuff is excluded at current time because the way
they are defined makes it hard to properly deduce the correct list of
sources, and it is not worth, the core need being on wmaker and WPrefs.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:23 +00:00
Christophe CURIS
d458304610 wrlib: generate automatically the list of symbols to keep from the API header
Instead of having to maintain manually the map file for LD with the list of
symbols that we want to keep in the WRaster library (the purpose is to hide
internal symbols), this patch implements a script that parses the public
API header and extracts automatically the list of names that are supposed
to be visible to the user.

The goal is to reduce possible human errors, like for example the function
RCombineAlpha that was forgotten from the list, yet still keep the map file
feature which is considered a good practice (it reduces the risk for name
clash and the risk of mis-use of internal stuff from the library).

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-05 15:28:44 +00:00
Christophe CURIS
10371836ed wmaker: work around compilers that do not support nested functions
There are a few cases in which nested functions are an helpful way to write
code, as this is explained in 'script/nested-func-to-macro.sh'. However,
some compiler do not support them (like clang), so this patch proposes an
elegant solution, where developers can get the benefit of them, but for
users they are automatically converted to C macro if needed.

The advantage of this solution is that we keep the code simple, there is no
hack in the source (like #ifdef and code duplication), yet still having the
full advantages.

The translation is done according to what have been detected by configure
(see the WM_PROG_CC_NESTEDFUNC macro) so that user has nothing to do.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-07 09:52:21 +00:00