public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <arsen@aarsen.me>
To: gcc-patches@gcc.gnu.org
Cc: "Arsen Arsenović" <arsen@aarsen.me>
Subject: [PATCH+wwwdocs 0/8] A small Texinfo refinement
Date: Fri, 27 Jan 2023 01:18:28 +0100	[thread overview]
Message-ID: <cover.1674777149.git.arsen@aarsen.me> (raw)

Evening,

This patchset includes the requisite changes to gcc-wwwdocs and gcc in
order to produce hopefully more accessible and readable documentation.
For optimal results, please install Texinfo from master (there's
currently no release that includes the few patches I made, the changes
in which this patchset exploit).

This patchset consists of changes that are mostly mechanical, and came
down to reordering @item and @XYZindex commands appropriately.  Attached
to a few commits are pieces of automation that helped the process.

Note that some manuals were not consistent with the rest, specifically
the Ada ones, and so the methods I used weren't applicable to them
without producing massive amounts of unrelated changes.  For the same
reasons as the following paragraph, I have decided to defer those.

I also started doing less mechanical changes, like the @defbuiltin
stuff, but after going over extend.texi I've noticed many sections
that'd need many kinds of slightly different rework, and likely would
require inventing some new convention (for instance, the
instruction-generating built-ins come to mind, there's currently
precedent of documenting them as @example blocks that list them, but
this skips indexing, breaks the flow on text on narrow screens, and is
generally inconsistent with other builtins).  I've decided to halt this
effort for the current release cycle, based on how much time I'll have
until the release.

I am curious about why texinfo.tex was left out of date for so long.  If
there's some reason, please let me know, and I'll see what I can do to
remedy the problem.  From a quick look I presumed there's none and
updated to the latest version.  In the process, I also got rid of the
@gol macro, that was used for conditionally terminating lines, as this
appears to be working around a now-nonexistent bug (and it caused a
build issue on the new texinfo version).

Note, however, that I did not thoroughly test update_web_docs_git
script, as it seems to make a lot of assumptions about the environment
it's invoked in, and so, I couldn't replicate it.  Instead, I tested the
following:

  #!/bin/sh
  set -xe
  MANUALS="cpp
    cppinternals
    fastjar
    gcc
    gccgo
    gccint
    gcj
    gdc
    gfortran
    gfc-internals
    gnat_ugn
    gnat-style
    gnat_rm
    libgomp
    libitm
    libquadmath
    libiberty
    porting"
  
  for file in $MANUALS; do
      rm -rf "${file}.html"
      mkdir "${file}.html"
      texi="$(find /home/arsen/gcc/gcc -name "$file.texi" | head -n 1)"
      [ "$texi" ] || continue
      includes="-I /home/arsen/gcc/gcc/gcc/doc/include"
      includes="$includes -I /home/arsen/gcc/outstuff/include"
      if [ "$file" = gnat_ugn ]; then
          includes="$includes -I /home/arsen/gcc/gcc/gcc/ada"
          includes="$includes -I /home/arsen/gcc/gcc/gcc/ada/doc/gnat_ugn"
      fi
      makeinfo --html -o "${file}.html" $includes \
               --css-ref="/~arsen/final/texinfo-manuals.css" \
               -c TOP_NODE_UP_URL="/~arsen/final/" \
               "$texi"
      makeinfo --pdf -o "${file}.pdf" $includes "$texi"
      makeinfo --dvi -o "${file}.dvi" $includes "$texi"
      makeinfo --info -o "${file}.info" $includes "$texi"
  done

This appeared to produce decent results when I was searching for various
parts I touched.

The output of the script above is visible online:
https://www.aarsen.me/~arsen/final/

This was built against the a8306872ffc91e8d9572a3feedaa125be3c5c1d0
commit in Texinfo.

Thanks in advance, have a lovely night.

=== gcc.git ===

Arsen Arsenović (7):
  docs: Create Indices appendix
  docs: Reorder @opindex to be before corresponding options
  **/*.texi: Reorder index entries
  docs: Mechanically reorder item/index combos in extend.texi
  doc: Add @defbuiltin family of helpers, set documentlanguage
  Update texinfo.tex, remove the @gol macro/alias
  update_web_docs_git: Update CSS reference to new manual CSS

 gcc/d/gdc.texi                         |  144 +-
 gcc/d/implement-d.texi                 |   66 +-
 gcc/doc/cfg.texi                       |   12 +-
 gcc/doc/cpp.texi                       |   12 +-
 gcc/doc/cppdiropts.texi                |   24 +-
 gcc/doc/cppenv.texi                    |    4 +-
 gcc/doc/cppopts.texi                   |   94 +-
 gcc/doc/cppwarnopts.texi               |   14 +-
 gcc/doc/extend.texi                    | 2564 ++++----
 gcc/doc/gcc.texi                       |   36 +-
 gcc/doc/generic.texi                   |    2 +-
 gcc/doc/implement-c.texi               |    2 +-
 gcc/doc/include/gcc-common.texi        |   26 +-
 gcc/doc/include/texinfo.tex            | 7599 +++++++++++++--------
 gcc/doc/install.texi                   |    6 +-
 gcc/doc/invoke.texi                    | 8420 ++++++++++++------------
 gcc/doc/lto.texi                       |    8 +-
 gcc/doc/md.texi                        |   25 +-
 gcc/doc/rtl.texi                       |    8 +-
 gcc/doc/sourcebuild.texi               |    4 -
 gcc/doc/tm.texi                        |    4 +-
 gcc/doc/trouble.texi                   |    8 +-
 gcc/fortran/intrinsic.texi             |  722 +-
 gcc/fortran/invoke.texi                |  394 +-
 gcc/go/gccgo.texi                      |   34 +-
 maintainer-scripts/update_web_docs_git |    2 +-
 26 files changed, 11004 insertions(+), 9230 deletions(-)

=== gcc-wwwdocs.git ===

Arsen Arsenović (1):
  Add revised Texinfo manual CSS

 htdocs/texinfo-manuals.css | 129 +++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 htdocs/texinfo-manuals.css
-- 
2.39.1


             reply	other threads:[~2023-01-27  0:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  0:18 Arsen Arsenović [this message]
2023-01-27  0:18 ` [PATCH 1/7] docs: Create Indices appendix Arsen Arsenović
2023-01-27  0:18 ` [PATCH 2/7] docs: Reorder @opindex to be before corresponding options Arsen Arsenović
2023-01-27  0:18 ` [PATCH 3/7] **/*.texi: Reorder index entries Arsen Arsenović
2023-01-27 10:41   ` Iain Buclaw
2023-02-23  0:58   ` Gerald Pfeifer
2023-02-23  9:25     ` (rebased patchset) " Arsen Arsenović
2023-02-23  8:11   ` Thomas Schwinge
2023-02-23  8:44     ` Arsen Arsenović
2023-01-27  0:18 ` [PATCH 4/7] docs: Mechanically reorder item/index combos in extend.texi Arsen Arsenović
2023-01-27  0:18 ` [PATCH 5/7] doc: Add @defbuiltin family of helpers, set documentlanguage Arsen Arsenović
2023-01-27  0:18 ` [PATCH 6/7] Update texinfo.tex, remove the @gol macro/alias Arsen Arsenović
2023-01-27  0:18 ` [PATCH 7/7] update_web_docs_git: Update CSS reference to new manual CSS Arsen Arsenović
2023-01-27  0:18 ` [wwwdocs] Add revised Texinfo " Arsen Arsenović
2023-02-24  0:26   ` Gerald Pfeifer
2023-02-24  6:41     ` Arsen Arsenović
2023-01-27 12:02 ` [PATCH+wwwdocs 0/8] A small Texinfo refinement Arsen Arsenović
2023-02-23  1:13   ` Gerald Pfeifer
2023-02-13 18:51 ` Ping: " Arsen Arsenović
2023-02-21 14:59   ` Ping^2: " Arsen Arsenović
2023-02-23  1:26     ` Gerald Pfeifer
2023-02-23 17:59       ` Sandra Loosemore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1674777149.git.arsen@aarsen.me \
    --to=arsen@aarsen.me \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).