GCC documentation: porting to Sphinx

Martin Liška mliska@suse.cz
Fri Jun 11 14:33:46 GMT 2021


On 6/10/21 6:49 PM, Joseph Myers wrote:
> On Thu, 10 Jun 2021, Martin Liška wrote:
> 
>> 1) Can we organize the new documentation in $gccroot/doc folder
>> similarly to what I have in texi2rst-generated repo? Would be beneficial
>> as we can have a single Makefile and shared content will be in a same
>> depth to the individual manuals.
> 
> Where languages have their own manuals, I think it's more appropriate for
> those to go under the language-specific directories.

So it will require the following folder structure:

$gccroot/gcc/doc/gcc - for GCC documentation
$gccroot/gcc/doc/gccint - for GCC internal documentation
$gccroot/gcc/doc/gfortran - for Fortran documentation
$gccroot/gcc/doc/gccgo - for GO documentation
...
$gccroot/doc/share - shared components
$gccroot/libgomp/doc - for libgomp documentation
...

Are you fine with that?

> 
> That doesn't stop the use of shared makefile code.  Make-lang.in is a
> fragment included from gcc/Makefile.in ("-include $(LANG_MAKEFRAGS)").  I
> certainly expect it should be possible to write GNU make code in
> gcc/Makefile.in for building and installing manuals, such that
> subdirectories only need to define a few variables describing what manuals
> they have and everything else is handled by common code.
> 

The Sphinx Makefile will be capable of e.g.
make html -C $gccroot/gcc/doc/gcc BUILDDIR=`pwd/put_it_somewhere`

and the only configure dependency will VERSION_PACKAGE and BUGURL which will
be provided in env:
https://github.com/marxin/texi2rst-generated/blob/6cfcb7b8ae6497d49ea23a38262dfa26854bdb40/sphinx/baseconf.py#L38-L39

Martin


More information about the Gcc-patches mailing list