I've downloaded the GDB source:

git clone git://sourceware.org/git/binutils-gdb.git

now how do I generate the documentation from source as can be downloaded from: https://sourceware.org/gdb/current/onlinedocs/ ?

I'm especially interested in the HTML documentation, especially if it is possible to build a single page version of it.

I'm at GDB master f47998d69f8d290564c022b010e63d5886a1fd7d after gdb-8.2-release.

2 Answers 2

cd binutils-gdb/gdb
cd doc
make html MAKEINFO=makeinfo MAKEINFOFLAGS='--no-split'
ls *.html

This assumes that you have makeinfo installed; that should be something like apt-get install texinfo on debian-like systems.

  • Thanks for this, but it failed with make: *** No rule to make target 'html'. Stop.. Any clues? GDB master f47998d69f8d290564c022b010e63d5886a1fd7d Ubuntu 16.04. Oct 23, 2018 at 16:25
  • Make sure you're in the doc directory and you had run ./configure before.
    – user313992
    Oct 23, 2018 at 16:26
  • Yes, I had done that, so you don't reproduce at that commit? make html on toplevel does run however, but is taking a while for some reason. Wonder if you don't have to run it on toplevel, and then maybe there is a way to select just gdb. Oct 23, 2018 at 16:29
  • I've updated the answer from memory; I'll just try it myself it if I don't get it right this time ;-)
    – user313992
    Oct 23, 2018 at 16:31
  • It works!!!!!!! The devs should put that on the website instead of the crappy one paragraph per page thing!!!! Oct 23, 2018 at 16:33

If you run:

cd binutils-gdb
make html MAKEINFO=makeinfo MAKEINFOFLAGS='--no-split'
find . -name '*.html'

then it takes a while, but generates single page HTML docs for all Binutils projects, which is also convenient.

-j $(nproc) does not work unfortunately.

I found that GAS docs for example could not be easily built as GDB by themselves. If you try to:

cd gas
cd doc
make html

then it fails with:

as.texi:23: @include: could not find bfdver.texi

so there seems to be a BFD dependency.

Tested on Ubuntu 18.04.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .