On Wed, Nov 10, 2021 at 9:26 AM Joel Sherrill <j...@rtems.org> wrote:
>
> Thanks for the quick reply.
>
> On Wed, Nov 10, 2021 at 8:20 AM Jonathan Wakely <jwakely....@gmail.com> wrote:
> >
> > On Wed, 10 Nov 2021 at 14:08, Joel Sherrill wrote:
> > >
> > > Hi
> > >
> > > It's been a while since I tried this and it appears things have
> > > changed. I tried to follow the instructions at:
> > >
> > > https://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_hacking.html
> >
> > Are you asking about docs for GCC itself, or libstdc++? Those docs are
> > for the latter only.
>
> I was hoping to build everything including libstdc++.

This is something I've been meaning to work on lately; I recently did
a patch to allow the install-dvi target to work from the top-level,
and was meaning to do likewise for install-man, too... but instead I
ran into bug 102824 first, so I kinda want to get that fixed first:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102824

>
> FYI Google found that page for "generating GCC docs" and I obviously missed
> that it was C++ only. The URL has C++ and the first sentence also says that 
> but
> the section title must be more important to the search.
>
> > > with gcc 11.2 and had a few questions:
> > >
> > > + I did a simple configure --prefix=/tmp/gcc-docs the first time and
> > > then "make html". One of those told me prerequisites were missing so I
> > > downloaded them and then it proceeded to build the compiler before
> > > building the html. Is that expected? Can you build the docs without
> > > building the compiler itself?
> >
> > For libstdc++? Yes, see maintainer-scripts/generate_libstdcxx_web_docs
> >
> > For GCC itself, I am not sure, but
> > maintainer-scripts/update_web_docs_git might help.
>
> Thanks. I'll try those.
>
> > > + I was going through the formats in the order on the document. I
> > > sucessfully built html and pdf. But make man from the top of the build
> > > directory doesn't work.
> > >
> > >  make man
> > > make: *** No rule to make target `man'.  Stop.
> >
> > You seem to be trying to follow the libstdc++ docs in the top-level,
> > that's not going to work.
>
> Gotcha.

IMO it *should* work, though; `make man` is a common Makefile target
that is recognized in some of the subdirectories, which ought to be
made consistent throughout all of them.

>
> > > "make -C gcc install-man" does install some man pages so I'm guessing
> > > something is wrong with the top Makefile.
> >
> > I think you're following the wrong docs.
> >
> > At the top-level, 'make -C gcc doc' works, and so does 'make -C gcc html'
>
> Is there a top-level stanza to generate docs for everything or is just
> a sequence of commands and I need to look at the scripts?
>

I agree that having a top-level `make docs` target (and `make
install-docs` target) that does all of the other documentation targets
would be useful; feel free to open a bug on bugzilla about it, and
I'll confirm it.

> > If you really do want to build the libstdc++ docs, you need to be in
> > the $target/libstdc++-v3/ sub-directory to use the libstdc++ makefile
> > targets.
>
> OK. Plenty to digest.
>
> Thanks.
>
> --joel

Reply via email to