During 'make man', makedocbook falsely reports "texinfo command
'@modifier' remains in output" while processing the setlocal(3) manpage,
which contains that literal string.
Move the check for unrecognized texinfo commands to before processing
'@@' (an escaped '@') in the texinfo source, and teach it to ignore
them.
Improve that check slightly, so it catches non-alphabetic texinfo
commands, of which there are few.
Now we don't have false positives, we can make unrecognized texinfo
commands fatal to manpage generation, rather than leaving them verbatim
in the generated manpage.
Drop 'makedocbook --cache' (any dependency on the man-cache rule which
invokes that was dropped by the non-recursive make changes)
Instead, add some explicit locking which prevents processes colliding
over the file containing generated python code for the parser table.
> ERROR: xref linking to Stubs has no generated link text.
> Error: no ID for constraint linkend: Stubs.
(Despite saying "ERROR", this is actually a warning, and manpages are
still generated)
Improve chapter-texi2docbook so it generates elements for texinfo
sections as well, so that a cross-reference to the "Stubs" section
contains a valid element ID.
../newlib/libc/libc.xml:22242: element refentry: validity error : ID iconv already defined
<refentry id="iconv">
Use a separate namespace for chaper ids, to avoid collision between the
ids for the chapter and function 'iconv', now that iconv documentation
is generated unconditionally.
Convert all the libc/ subdir makes into the top-level Makefile. This
allows us to build all of libc from the top Makefile without using any
recursive make calls. This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libc.a. The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libc_a_SOURCES.
There's a few dummy.c files that are no longer necessary since we aren't
doing the lib.a accumulating, so punt them.
The winsup code has been pulling the internal newlib ssp library out,
but that doesn't exist anymore, so change that to pull the objects.
Make sure we depend on the right name of mkdoc all the time, and that
the rules that need it (e.g. .def files) depend on it.
Reported-by: Jon Turney <jon.turney@dronecode.org.uk>
This allows building the libc & libm pages in parallel, and drops
the duplication in the subdirs with the chew/chapter settings.
The unused rules in Makefile.shared are left in place to minimize
noise in the change.
Teach makedocbook how to handle some new things seen in the makedoc markup
since eae68bfc:
- 'link with' lines appearing in SYNOPSIS sections
Also, don't raise a NoneType exception when there's something we don't
know how to handle in a SYNOPSIS section, just exit.
- From: Cesar Philippidis <cesar@codesourcery.com>
Date: Tue, 10 Apr 2018 14:43:42 -0700
Subject: [PATCH] nvptx port
This port adds support for Nvidia GPU's, which are primarily used as
offload accelerators in OpenACC and OpenMP.
To follow up the thread starting at [1], since all uses of TRAD_SYNOPSIS
have been removed, and all uses of ANSI_SYNOPSIS have been renamed to
SYNOPSIS, we can now warn about the use of these.
[1] https://sourceware.org/ml/newlib/2017/msg01182.html
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Discard QUICKREF sections, rather than writing them to stderr
Discard MATHREF sections, rather than discarding as an error
Pass NOTES sections through to texinfo, rather than discarding as an error
Don't redirect makedoc stderr to .ref file
Remove makedoc output on error
Remove .ref files from CLEANFILES
Regenerate Makefile.ins
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Teach makedocbook how to handle some new things seen in the makedoc markup
since bd547490:
- struct lines appearing in the synopsis
- use of @strong{} texinfo markup
Ensure the Python Lex/Yacc (PLY) cache used by makedocbook is initialized
before it is used by parallelizable rules to make the DocBook XML, as it
appears that these can collide in cache generation, leading to errors.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Add makedocbook, a tool to process makedoc markup and output DocBook XML
refentries.
Process all the source files which are processed with makedoc with
makedocbook as well
Add chapter-texi2docbook, a tool to automatically generate DocBook XML
chapter files from the chapter .texi files. For generating man pages all we
care about is the content of the refentries, so all this needs to do is
convert the @include of the makedoc generated .def files to xi:include of
the makedocbook generated .xml files.
Add skeleton Docbook XML book files, lib[cm].in.xml which include these
generated chapters, which in turn include the generated files containing
refentries, which is processed with xsltproc to generate the lib[cm].xml
Add new make targets to generate and install man pages from lib[cm].xml
Add makedocbook, a tool to process makedoc markup and output DocBook XML
refentries.
Process all the source files which are processed with makedoc with
makedocbook as well
Add chapter-texi2docbook, a tool to automatically generate DocBook XML
chapter files from the chapter .texi files. For generating man pages all we
care about is the content of the refentries, so all this needs to do is
convert the @include of the makedoc generated .def files to xi:include of
the makedocbook generated .xml files.
Add skeleton Docbook XML book files, lib[cm].in.xml which include these
generated chapters, which in turn include the generated files containing
refentries, which is processed with xsltproc to generate the lib[cm].xml
Add new make targets to generate and install man pages from lib[cm].xml
Align makedoc's iscommand() with it's documentation, and don't allow commands to
contain a space. A command is a line containing only a sequence of capital
letters or '_', followed by optional spaces.
This prevents "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE" (the only line in the license text which consists of only
capitals and spaces, without any punctuation) from being interepreted as a
makedoc command, leading to:
"Can't find IMPLIED"
"warning, IMPLIED is not recognised"
being emitted by makedoc, (which is normally un-noticed because makedoc's stderr
is redirected to a .ref file)
2015-11-06 Jon Turney <jon.turney@dronecode.org.uk>
* doc/makedoc.c (iscommand): Only allow commands to have trailing
spaces, not space separated words.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
The unused INTERNAL_DEFINITION, INTERNAL_FUNCTION and INTERNAL commands are
defined in terms of the non-existent built-in 'func'
This causes every single invocation of makedoc to output "Can't find func" three
times, as it parses doc.str.
This is normally un-noticed because makedoc's stderr is redirected to a .ref
file.
Fix these unused command definitions to something with equivalent lack of
effect, but without generating an error.
2015-11-06 Jon Turney <jon.turney@dronecode.org.uk>
* doc/doc.str: Fix INTERNAL_DEFINITION, INTERNAL_FUNCTION and
INTERNAL.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
On 11/08/2015 11:08, Andre Vieira wrote:
> On 10/08/15 14:38, Jon TURNEY wrote:
>> On 07/08/2015 11:13, Andre Vieira wrote:
>>> Building the manuals on Ubuntu LTS 14.04 (64-bit) using pdfTeX
>>> 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) is failing with the
>>> following error:
>>> "Transcript written on libc.log.
>>> /usr/bin/texi2dvi: pdfetex exited with bad status, quitting."
>>>
>>> libc.log complaints about the following:
>>>
>>> You can't use `@unskip' in vertical mode.
>>>
[...]
>>>
>>> This code has been around for a while, so it might have to do with a
>>> change in pdfTex?
So it seems this problem has been around for a while, and looks like it
is due to a change in texi2dvi in texinfo 5.0 or late 4.x, see [1].
I guess it's not very noticeable since it only occurs when doing 'make
dvi', which doesn't happen by default.
Attached is a different and perhaps cleaner workaround to the one in
that thread.
[1] https://sourceware.org/ml/newlib/2013/msg00057.html
From 4d386b5900b6c68e022004b447faa696be5ff8c7 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Tue, 11 Aug 2015 14:46:39 +0100
Subject: [PATCH] Use '@sp 1' rather than '@*' to workaround a change in
texi2dvi.
Since about TexInfo 5.0, using '@*' immediately after a table causes a 'You
can't use `@unskip' in vertical mode' error.
See https://sourceware.org/ml/newlib/2013/msg00057.html
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>